private void AssertPaidInvoice(CustomerInvoiceJournalItem item)
        {
            IList used = ReceiptRepository.FindPaidCustomerInvoice(m_command, item.ID);

            if (used.Count > 0)
            {
                throw new Exception("This Invoice [" + item.INVOICE_NO + "] is paid [" + ((ReceiptItem)used[0]).EVENT_JOURNAL.CODE + "], please delete receipt first.");
            }
        }
Exemple #2
0
 protected override void doRevise(EventJournal events, Period p)
 {
     foreach (ARCreditNoteItem item in events.EVENT_JOURNAL_ITEMS)
     {
         IList paid = ReceiptRepository.FindReceiptUsingARCR(m_command, item.EVENT_JOURNAL.ID);
         // if (((ARCreditNote)events).USED_FOR_PAYMENT)
         if (paid.Count > 0)
         {
             throw new Exception("ARCR[" + item.EVENT_JOURNAL.CODE + "] has been used by Receipt [" + ((ReceiptItem)paid[0]).EVENT_JOURNAL.CODE + "], please delete receipt.");
         }
         SetVendorBalance(item, p);
         item.ProcessUnPosted();
         updateVendorBalances(item.VENDOR_BALANCE);
         deleteVendorBalanceEntry(item.VENDOR_BALANCE_ENTRY);
     }
 }
Exemple #3
0
 protected override void doRevise(EventJournal events, Period p)
 {
     foreach (CustomerOutStandingInvoiceItem item in events.EVENT_JOURNAL_ITEMS)
     {
         IList used = ReceiptRepository.FindPaidCustomerOutstanding(m_command, item.ID);
         if (used.Count > 0)
         {
             //if (item.PAID_AMOUNT > 0)
             throw new Exception("This Invoice [" + item.INVOICE_NO + "] is paid [" + ((ReceiptItem)used[0]).EVENT_JOURNAL.CODE + "], please delete receipt first.");
         }
         SetVendorBalance(item, p);
         item.ProcessUnPosted();
         updateVendorBalances(item.VENDOR_BALANCE);
         deleteVendorBalanceEntry(item.VENDOR_BALANCE_ENTRY);
     }
 }
Exemple #4
0
 public POSRepository()
     : base()
 {
     r_cij     = new CustomerInvoiceJournalRepository(m_command);
     r_receipt = new ReceiptRepository(m_command);
 }