예제 #1
0
        private Ariv _checkbyInvoiceno(string invoiceno)
        {
            Ariv ariv = new Ariv(_dbpath);

            ariv.checkPayment(invoiceno);
            return(ariv);
        }
예제 #2
0
 private void _checkPayment()
 {
     foreach (OutstandingBill bill in _outStandingBills)
     {
         _ariv.checkPayment(bill.reference_id);
         if (!String.IsNullOrEmpty(_ariv.DOCNO) && _ariv.PAYMENTAMT != 0)
         {
             // Console.WriteLine(bill.reference_id + " " + _ariv.PAYMENTAMT);
             Console.WriteLine(_ariv.DOCNO + " " + _ariv.PAYMENTAMT);
             OutstandingBill outstandingBill = new OutstandingBill();
             int             balance         = _adjustBalance(_ariv.DOCAMT, _ariv.PAYMENTAMT);
             outstandingBill.uuid                     = bill.uuid;
             outstandingBill.reference_id             = bill.reference_id;
             outstandingBill.amount_cents             = bill.amount_cents;
             outstandingBill.outstanding_amount_cents = balance;
             outstandingBill.status                   = _setStatus(balance, bill.status);
             _updatedBills.Add(outstandingBill);
         }
         else
         {
             Console.WriteLine($"No payment found for : {bill.reference_id}");
         }
     }
 }