More small fixes

This commit is contained in:
Rick Falkvinge
2016-01-03 21:36:40 +01:00
parent bcbbd68f3a
commit cfb2e55141
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -120,6 +120,7 @@ namespace Swarmops.Logic.Financial
{
string monthName = new DateTime (year, monthNumber, 1).ToString ("MMM",
new CultureInfo (person.PreferredCulture));
monthName = monthName.Substring (0, 3); // believe it or not some .Net localizations don't respect the three letter limit
string lineItem = " " + monthName;
if (personSalaryLookup[personId].ContainsKey (monthNumber) && personSalaryLookup[personId][monthNumber].GrossSalaryCents > 0)
@@ -152,10 +153,13 @@ namespace Swarmops.Logic.Financial
customStrings["NetSalaryTotal"] = String.Format("{0:10,N2}", netTotal / 100.0);
customStrings["TaxAdditiveTotalUnpadded"] = String.Format("{0:N2}", addTaxTotal / 100.0);
// Send notification
// Send notification if gross is nonzero
OutboundComm.CreateNotification (organization, NotificationResource.Salary_LastYearSummary,
notificationStrings, customStrings, People.FromSingle (Person.FromIdentity (1)));
if (grossTotal > 0)
{
OutboundComm.CreateNotification (organization, NotificationResource.Salary_LastYearSummary,
notificationStrings, customStrings, People.FromSingle (Person.FromIdentity (1)));
}
}
}
}
@@ -397,7 +397,7 @@ Month Gross Deducted Net Paid using
TOTAL [GrossSalaryTotal] [TaxDeductedTotal] [NetSalaryTotal]
In addition, [CurrencyCode] [TaxAdditiveTotalUnpadded] have been paid in taxes by the organization for your employment. This is also a tax on your salary, even if its nature as such has been bureaucratically concealed.</value>
In addition, [CurrencyCode] [TaxAdditiveTotalUnpadded] have been paid in taxes by the organization for your employment, in addition to the amount deducted above. This is also a tax on your salary, even if its nature as such has been bureaucratically concealed.</value>
<comment>Note the hard spacing - maintain character count to align columns and elements in a monospace font rendering.</comment>
</data>
<data name="Salary_LastYearSummary_Subject" xml:space="preserve">