Esempio n. 1
0
 public void createInvoice()
 {
     try
     {
         UpStream.perform();
         this.inv = new InvoiceModel();
         var ms = (DateTime.Now - DateTime.MinValue).TotalMilliseconds * 10;
         inv.id            = ms.ToString();
         inv.number        = "IN" + ms.ToString();
         inv.date          = DateTime.Now.ToString("yyyy-MM-dd");
         inv.department_id = DepartmentSettings.DepartmentId;
         inv.till_id       = DepartmentSettings.TillId;
         inv.barcode       = inv.number;
         dynamic invoice = inv.create(inv);
         if (invoice != null)
         {
             ActivityLogModel.track("invoice", "create", this.inv.id);
             invoiceNumber.Text = "" + invoice.number;
         }
         else
         {
             invoiceNumber.Text = "Unable to create Invoice";
         }
     }
     catch (Exception ex)
     {
         invoiceNumber.Text = "Error: " + ex.Message.ToString();
     }
 }
Esempio n. 2
0
 public void paymentCompleted()
 {
     updateInvoice();
     UpStream.perform();
 }