public static SupplierCreditInvoice CreateNewCreditInvoice(this SupplierCreditInvoice scinv, Branch br, User us, Purchase pu)
 {
     return(scinv = new SupplierCreditInvoice()
     {
         id = 0,
         dueDays = 0,
         creditAmount = pu.creditAmount,
         paidAmount = 0.00m,
         balanceAmount = pu.creditAmount,
         purchase = pu,
         supplierCreditAccount = pu.supplier.supplierCreditAccount
     });
 }
예제 #2
0
        public static async Task <SupplierCreditInvoice> GetCustomerByIdAndBranchIdAsync(IRestDataMapper mapper, long puid)
        {
            SupplierCreditInvoice reds = new SupplierCreditInvoice();

            if (mapper == null)
            {
                return(reds);
            }
            string url = $"suppliercreditac/api/v1/suppliercri/inv/{puid}";

            reds = await mapper.GetDataAsync <SupplierCreditInvoice>(url);

            return(reds);
        }
예제 #3
0
        public static async Task <SupplierCreditInvoice> updateSupplierCreditInvoiceAsync(IRestDataMapper mapper, SupplierCreditInvoice data)
        {
            SupplierCreditInvoice reds = new SupplierCreditInvoice();

            if (mapper == null)
            {
                return(reds);
            }
            string url = $"suppliercreditac/api/v1/suppliercri/{data.id}";

            reds = await mapper.PostDataAsync(url, data);

            return(reds);
        }