예제 #1
0
 public ActionResult UpdateBilling(IPQuotesModel model)
 {
     //  model.quote_tax_rate.quote_id = model.quote_id;
     //model.quote_amount.quote_id = model.quote_id;
     quoteService.UpdateStatus(model);
     if (model.quote_items != null)
     {
         quoteItemService.Update(model.quote_items, model.quote_id);
     }
     model.quote_amount.quote_id = model.quote_id;
     quoteAmountsService.Update(model.quote_amount);
     //quoteTaxRatesService.Update(model.quote_tax_rate);
     return(RedirectToAction("Billing", new
     {
         id = model.quote_id
     }));
 }
예제 #2
0
 public ActionResult UpdatePurchase(IPPurchaseModel model)
 {
     //  model.quote_tax_rate.quote_id = model.quote_id;
     //model.quote_amount.quote_id = model.quote_id;
     quoteService.Update(model);
     if (model.quote_items != null)
     {
         quoteItemService.Update(model.quote_items, model.quote_id);
     }
     model.quote_amount.quote_id = model.quote_id;
     quoteAmountsService.Update(model.quote_amount);
     if (model.payment != null)
     {
         model.payment.quote_id = model.quote_id;
         paymentService.Update(model.payment);
     }
     //quoteTaxRatesService.Update(model.quote_tax_rate);
     return(RedirectToAction("Purchase", new { id = model.quote_id }));
 }
예제 #3
0
 public ActionResult UpdateQuote(IPQuotesModel model)
 {
     //  model.quote_tax_rate.quote_id = model.quote_id;
     //model.quote_amount.quote_id = model.quote_id;
     if (!string.IsNullOrEmpty(model.quote_date_expires_string))
     {
         model.quote_date_expires = DateTime.ParseExact(model.quote_date_expires_string, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
     }
     else
     {
         model.quote_date_expires = DateTime.Now;
     }
     quoteService.UpdateStatus(model);
     if (model.quote_items != null)
     {
         quoteItemService.Update(model.quote_items, model.quote_id);
     }
     model.quote_amount.quote_id = model.quote_id;
     quoteAmountsService.Update(model.quote_amount);
     //quoteTaxRatesService.Update(model.quote_tax_rate);
     return(RedirectToAction("Quote", new { id = model.quote_id }));
 }
예제 #4
0
 public ActionResult UpdateInvoices(IPQuotesModel model)
 {
     if (!string.IsNullOrEmpty(model.quote_date_expires_string))
     {
         model.quote_date_expires = DateTime.ParseExact(model.quote_date_expires_string, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
     }
     else
     {
         model.quote_date_expires = DateTime.Now;
     }
     quoteService.UpdateInvoice(model);
     if (model.quote_items != null)
     {
         quoteItemService.Update(model.quote_items, model.quote_id);
     }
     model.quote_amount.quote_id = model.quote_id;
     quoteAmountsService.Update(model.quote_amount);
     if (model.payment != null)
     {
         model.payment.quote_id = model.quote_id;
         paymentService.Update(model.payment);
     }
     return(RedirectToAction("Invoices", new { id = model.quote_id }));
 }