public ActionResult GetPaymentVoucherByInvoiceId(string _voucherInvoiceId)
        {
            BO_PaymentVoucher obj = new BussinessObject.BO_PaymentVoucher();

            obj = BL_PaymentVoucher.GetPaymentVoucherByInvoiceId(_voucherInvoiceId);
            return(Json(obj, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public static BO_PaymentVoucher GetPaymentVoucherByInvoiceId(string _pvoucherInvoiceId)
        {
            using (AprosysAccountingEntities db = new AprosysAccountingEntities())
            {
                var obj = db.GetPaymentVoucherByVoucherNo(_pvoucherInvoiceId).ToList();
                BO_PaymentVoucher _pvoucher = new BussinessObject.BO_PaymentVoucher();

                if (obj != null)
                {
                    _pvoucher.invoiceNo           = obj[0].InvoiceNo;
                    _pvoucher.activityDate        = obj[0].ActivityTimestamp;
                    _pvoucher.expenseTypeCategory = obj[0].HEADTYPEID;
                    _pvoucher.expensetype         = obj[0].ActingId;
                    _pvoucher.paid     = obj[0].Amount;
                    _pvoucher.comments = obj[0].Comments;
                }
                return(_pvoucher);
            }
        }