Ejemplo n.º 1
0
 public bool addDivisionToInvoice(InvoiceDivision inv_div, Queue <ZeroCostDocument> zeroCostInvoiceItems)
 {
     if (invc_sid != inv_div.invc_sid)
     {
         return(false);
     }
     if (inv_div.isZeroCost())
     {
         if (!hasZeroCost)
         {
             hasZeroCost = true;
             divisions.Clear();
         }
         ZeroCostDocument doc = new ZeroCostDocument();
         doc.alu     = inv_div.alu;
         doc.doc_sid = inv_div.invc_sid;
         doc.feature = MainController.Features.SALE;
         zeroCostInvoiceItems.Enqueue(doc);
     }
     else
     {
         divisions.Add(inv_div);
     }
     return(true);
 }
Ejemplo n.º 2
0
 public Invoice(InvoiceDivision inv_div, Queue <ZeroCostDocument> zeroCostInvoiceItems)
 {
     invc_sid = inv_div.invc_sid;
     group    = inv_div.getGroup();
     addDivisionToInvoice(inv_div, zeroCostInvoiceItems);
 }