Fix: Proc wasn't updated for Amount field removed
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Swarmops.Database
|
||||
/// </summary>
|
||||
public static int DbVersionExpected
|
||||
{
|
||||
get { return 50; }
|
||||
get { return 51; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -47,4 +47,5 @@
|
||||
0047 - Fix for null case in SetVatReportReleased [RF]
|
||||
0048 - Fix for CreateVatReportItem, ForeignObjectId=>ForeignId [RF]
|
||||
0049 - Another fix for CreateVatReportItem
|
||||
0050 - Added VatReports.OpenTransaction, .CloseTransaction
|
||||
0050 - Added VatReports.OpenTransaction, .CloseTransaction
|
||||
0051 - Fix for CreateFinancialTransactionStub with Amount field gone (caused in 0043) [RF]
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
DROP PROCEDURE IF EXISTS `SetVatReportOpenTransaction`
|
||||
|
||||
#
|
||||
|
||||
CREATE PROCEDURE `CreateFinancialTransactionStub`(
|
||||
IN organizationId INTEGER,
|
||||
IN financialAccountId INTEGER,
|
||||
IN amountCents BIGINT,
|
||||
IN dateTime DATETIME,
|
||||
IN comment TEXT,
|
||||
IN importHash VARCHAR(32),
|
||||
IN personId INTEGER
|
||||
)
|
||||
BEGIN
|
||||
|
||||
DECLARE financialTransactionId INTEGER;
|
||||
|
||||
SELECT 0 INTO financialTransactionId;
|
||||
|
||||
IF ((SELECT COUNT(*) FROM FinancialTransactions WHERE FinancialTransactions.ImportHash=importHash) = 0)
|
||||
THEN
|
||||
INSERT INTO FinancialTransactions (OrganizationId, DateTime, Comment, ImportHash)
|
||||
VALUES (organizationId, dateTime, comment, importHash);
|
||||
|
||||
SELECT LAST_INSERT_ID() INTO financialTransactionId;
|
||||
|
||||
INSERT INTO FinancialTransactionRows (FinancialAccountId, FinancialTransactionId, AmountCents, CreatedDateTime, CreatedByPersonId)
|
||||
VALUES (financialAccountId, financialTransactionId, amountCents, DateTime, personId);
|
||||
|
||||
END IF;
|
||||
|
||||
SELECT financialTransactionId AS Identity;
|
||||
|
||||
END
|
||||
@@ -303,8 +303,8 @@ namespace Swarmops.Site.Pages.Ledgers
|
||||
Math.Abs (resultDetail.BalanceMismatchCents/100.0), resultDetail.CurrencyCode);
|
||||
break;
|
||||
case ImportResultsCategory.Bad:
|
||||
html = Resources.Pages.Ledgers.UploadBankFiles_ResultsBad +
|
||||
(string) GuidCache.Get(guid + "-Exception");
|
||||
html = Resources.Pages.Ledgers.UploadBankFiles_ResultsBad + "<!-- Technical Information: " +
|
||||
(string) GuidCache.Get(guid + "-Exception") + "-->";
|
||||
break;
|
||||
case ImportResultsCategory.Payments:
|
||||
if (paymentsDetail.DuplicatePaymentCount > 0)
|
||||
|
||||
Reference in New Issue
Block a user