Example #1
0
        public static void InvalidateJournalEntry(GLJournalEntrysInfo entry, GLJournalVouchersInfo voucher, BusinessObject objSourceObj)
        {
            BusinessObjectHelper.CopyFKFields(objSourceObj, entry, true);
            BusinessObjectHelper.CopyFKFields(voucher, entry, true);
            BusinessObjectHelper.CopyField(objSourceObj, entry, "JournalDate", false);

            BusinessObjectHelper.CopyField(objSourceObj, entry, "Voucher", false);
            BusinessObjectHelper.CopyField(objSourceObj, entry, "VoucherContent", false);
            BusinessObjectHelper.CopyField(objSourceObj, entry, "VoucherDate", false);

            if (String.IsNullOrWhiteSpace(entry.EntryType))
            {
                entry.EntryType = ABCCommon.ABCConstString.EntryTypeERP;
            }
            entry.RaiseAmtTot = entry.AmtTot;

            entry.FK_GLAccountID_RaiseCredit = entry.FK_GLAccountID_Credit;
            entry.FK_GLAccountID_RaiseDebit  = entry.FK_GLAccountID_Debit;

            InvalidateJournalEntry(entry, voucher);
        }