Ejemplo n.º 1
0
        public ActionResult SearchARDebitNote(string documentNo)
        {
            if (documentNo != "0")
            {
                ARDebitNote ARDebitNote = null;

                ARDebitNote = new NetStock.BusinessFactory.ARDebitNoteBO().GetARDebitNote(new ARDebitNote {
                    DocumentNo = documentNo
                });

                if (ARDebitNote == null)
                {
                    ARDebitNote = new ARDebitNote();
                    ARDebitNote.DocumentDate       = DateTime.Today.Date;
                    ARDebitNote.ARDebitNoteDetails = new List <ARDebitNoteDetail>();
                }

                return(RedirectToAction("ARDebitNote", new { InvoiceType = "", DocumentNo = documentNo }));
                //return View("CBReceipt", cbReceipt);
            }
            else
            {
                return(RedirectToAction("ARDebitNote"));
            }
        }
Ejemplo n.º 2
0
        public ActionResult ARDebitNote(string invoiceType, string documentNo)
        {
            ARDebitNote ARDebitNote = null;

            if (invoiceType == Utility.NEWRECORD)
            {
                ARDebitNote = new ARDebitNote();
                ARDebitNote.DocumentDate       = DateTime.UtcNow.ThaiTime();
                ARDebitNote.ARDebitNoteDetails = new List <ARDebitNoteDetail>();
            }
            else
            {
                if (documentNo != null && documentNo != "" && documentNo != "null")
                {
                    ARDebitNote = new NetStock.BusinessFactory.ARDebitNoteBO().GetARDebitNote(new ARDebitNote {
                        DocumentNo = documentNo
                    });
                }
                else
                {
                    //ARInvoice = new NetStock.BusinessFactory.ARInvoiceBO().GetList().FirstOrDefault();

                    ARDebitNote = new ARDebitNote();
                    ARDebitNote.DocumentDate       = DateTime.Today.Date;
                    ARDebitNote.ARDebitNoteDetails = new List <ARDebitNoteDetail>();
                }
            }

            ARDebitNote.DebtorList        = Utility.GetDebtorList();
            ARDebitNote.CurrencyCodeList  = Utility.GetCurrencyItemList();
            ARDebitNote.DebtorAccountList = Utility.GetDebtorAccountList();
            ARDebitNote.AccountCodeList   = Utility.GetAccountCodeItemList();

            return(View("ARDebitNote", ARDebitNote));
        }
Ejemplo n.º 3
0
 public bool DeleteARDebitNote(ARDebitNote item)
 {
     return(ardebitnoteDAL.Delete(item));
 }
Ejemplo n.º 4
0
 public ARDebitNote GetARDebitNote(ARDebitNote item)
 {
     return((ARDebitNote)ardebitnoteDAL.GetItem <ARDebitNote>(item));
 }
Ejemplo n.º 5
0
 public bool SaveARDebitNote(ARDebitNote newItem)
 {
     return(ardebitnoteDAL.Save(newItem));
 }