Exemple #1
0
 public CustomerReports(Customer customer)
 {
     _id = customer._id;
     this.OwnerId = customer.OwnerId;
     this.Name = customer.Name;
     this.Email = customer.Email;
     this.BillingAddress = customer.BillingAddress;
     buildKeyWords(customer);
 }
Exemple #2
0
 private void buildKeyWords(Customer customer)
 {
     Keywords = new string[]{
                 customer._id.ToString(),
                 customer.Email,
                 customer.Name,
                 customer.OwnerId,
                 customer.BillingAddress
     };
 }
Exemple #3
0
 public string GetInvoiceDefaultTemplate(InvoiceReport invoice, Customer customer, Organization organization, LogoOrganization logo)
 {
     int sayTotal = Convert.ToInt32(GetTotal(invoice.SubTotal, GetTotalDiscount(invoice.Items), GetTotalTax()));
     StringTemplate template = new StringTemplate(TEMPLATE);
     template.SetAttribute("invoices", invoice);
     template.SetAttribute("customer", customer);
     template.SetAttribute("organization", organization);
     template.SetAttribute("totaldiscount", GetTotalDiscount(invoice.Items).ToString("###,###,###,##0"));
     template.SetAttribute("totaltax", GetTotalTax().ToString("###,###,###,##0"));
     template.SetAttribute("total", GetTotal(invoice.SubTotal, GetTotalDiscount(invoice.Items), GetTotalTax()).ToString("###,###,###,##0"));
     template.SetAttribute("InvoiceDate",invoice.InvoiceDate.ToString("dd-MMM-yyyy"));
     template.SetAttribute("DueDate", invoice.DueDate.ToString("dd-MMM-yyyy"));
     template.SetAttribute("SubTotal", invoice.SubTotal.ToString("###,###,###,##0"));
     template.SetAttribute("terbilang", SayNumber.Terbilang(sayTotal));
     template.SetAttribute("Note", invoice.Note);
     if (logo != null)
     {
         template.SetAttribute("logodata", Convert.ToBase64String(logo.ImageData));
     }
     string InvoiceReport = template.ToString();
     return InvoiceReport;
 }