public ActionResult ProcessRMAInward(RMAHeader rmaHeader) { if (rmaHeader.rmaDetails == null) { return(RedirectToAction("Inward")); } else { for (var i = 0; i < rmaHeader.rmaDetails.Count; i++) { //Comment by krishna 31/08/2017 // var rmaInwardDTO = new InvoiceDetailBO().GetVendorInvoiceDetailBySerialNo(rmaHeader.rmaDetails[i].SerialNo, BRANCH_ID, UTILITY.CONFIG_INVOICETYPE_VENDOR);//CONFIG_INVOICETYPE_CUSTOMER var rmaInwardDTO = new InvoiceDetailBO().GetVendorInvoiceDetailBySerialNo(rmaHeader.rmaDetails[i].SerialNo, BRANCH_ID, UTILITY.CONFIG_INVOICETYPE_CUSTOMER);//CONFIG_INVOICETYPE_CUSTOMER if (rmaInwardDTO != null) { rmaHeader.rmaDetails[i].DocumentNo = rmaInwardDTO.DocumentNo; rmaHeader.rmaDetails[i].WarrantyExpiryDate = rmaInwardDTO.InvoiceDate.AddMonths(rmaInwardDTO.WarrantyPeriod); rmaHeader.rmaDetails[i].IsValid = (UTILITY.SINGAPORETIME < rmaHeader.rmaDetails[i].WarrantyExpiryDate); } else { rmaHeader.rmaDetails[i].IsValid = false; } } } ViewBag.countries = new CountryBO().GetList().Select(x => new { Value = x.CountryCode, Text = x.CountryName }).ToList(); return(View("Inward", rmaHeader)); }
public ActionResult GenerateRMA(RMAHeader rmaHeader) { rmaHeader.rmaDetails = rmaHeader.rmaDetails.Where(x => x.IsValid == true).ToList(); rmaHeader.Status = true; rmaHeader.CreatedBy = USER_ID; rmaHeader.CreatedOn = UTILITY.SINGAPORETIME; rmaHeader.ModifiedBy = USER_ID; rmaHeader.ModifiedOn = UTILITY.SINGAPORETIME; rmaHeader.IncidentDate = UTILITY.SINGAPORETIME; var result = new RMAHeaderBO().SaveRMAHeader(rmaHeader, BRANCH_ID); string documentNo = rmaHeader.rmaDetails.FirstOrDefault().DocumentNo; List <RMADetail> rmaDetails = new RMADetailBO().GetListByDocumentNo(documentNo); List <string> serialNos = rmaDetails.Select(s => s.SerialNo).ToList(); var SNo = string.Empty; for (int i = 0; i < serialNos.Count; i++) { SNo += serialNos[i] + "</br>"; } new EmailGenerator().ConfigMail(rmaHeader.EmailID, true, documentNo, SNo); return(Content("<script language='javascript' type='text/javascript'>alert('RMA Number is Sent To Your Mail!');window.location = '/RMA/Inward';</script>")); //return RedirectToAction("Inward"); }
public RMAHeader GetRMAHeaderByDocumentNo(RMAHeader item) { return((RMAHeader)rmaheaderDAL.GetItemByDocumentNo <RMAHeader>(item)); }
public RMAHeader GetRMAHeader(RMAHeader item) { return((RMAHeader)rmaheaderDAL.GetItem <RMAHeader>(item)); }
public bool DeleteRMAHeader(RMAHeader item) { return(rmaheaderDAL.Delete(item)); }
public bool SaveRMAHeader(RMAHeader newItem, Int16 branchID) { return(rmaheaderDAL.Save(newItem, branchID)); }