public ActionResult SearchAPCreditNote(string documentNo) { if (documentNo != "0") { APCreditNote apCreditNote = null; apCreditNote = new NetStock.BusinessFactory.APCreditNoteBO().GetAPCreditNote(new APCreditNote { DocumentNo = documentNo }); if (apCreditNote == null) { apCreditNote = new APCreditNote(); apCreditNote.DocumentDate = DateTime.Today.Date; apCreditNote.APCreditNoteDetails = new List <APCreditNoteDetail>(); } return(RedirectToAction("APCreditNote", new { InvoiceType = "", DocumentNo = documentNo })); //return View("CBReceipt", cbReceipt); } else { return(RedirectToAction("APCreditNote")); } }
public ActionResult APCreditNote(string invoiceType, string documentNo) { APCreditNote apCreditNote = null; if (invoiceType == Utility.NEWRECORD) { apCreditNote = new APCreditNote(); apCreditNote.DocumentDate = DateTime.UtcNow.ThaiTime(); apCreditNote.APCreditNoteDetails = new List <APCreditNoteDetail>(); apCreditNote.CreditorList = Utility.GetCreditorList(); apCreditNote.AccountCodeList = Utility.GetAccountCodeItemList(); } else { if (documentNo != null && documentNo != "") { apCreditNote = new NetStock.BusinessFactory.APCreditNoteBO().GetAPCreditNote(new APCreditNote { DocumentNo = documentNo }); apCreditNote.CreditorList = Utility.GetCreditorList(); apCreditNote.AccountCodeList = Utility.GetAccountCodeItemList(); } else { //apInvoice = new NetStock.BusinessFactory.APInvoiceBO().GetList().FirstOrDefault(); apCreditNote = new APCreditNote(); apCreditNote.DocumentDate = DateTime.Today.Date; apCreditNote.APCreditNoteDetails = new List <APCreditNoteDetail>(); apCreditNote.CreditorList = Utility.GetCreditorList(); apCreditNote.AccountCodeList = Utility.GetAccountCodeItemList(); } } //apCreditNote.CreditorList = Utility.GetCreditorList(); //apCreditNote.CurrencyCodeList = Utility.GetCurrencyItemList(); return(View("APCreditNote", apCreditNote)); }
public APCreditNote GetAPCreditNote(APCreditNote item) { return((APCreditNote)apcreditnoteDAL.GetItem <APCreditNote>(item)); }
public bool DeleteAPCreditNote(APCreditNote item) { return(apcreditnoteDAL.Delete(item)); }
public bool SaveAPCreditNote(APCreditNote newItem) { return(apcreditnoteDAL.Save(newItem)); }