public string SavePaymentData(string paymentData, string cashData, string invoiceData, string currency, bool isCash, int _C_BPartner_ID, int _windowNo, string payment, string DateTrx, string appliedamt, string discount, string writeOff, string open, string DateAcct, int _CurrencyType_ID) { List <Dictionary <string, string> > pData = null; List <Dictionary <string, string> > cData = null; List <Dictionary <string, string> > iData = null; Ctx ct = Session["ctx"] as Ctx; string msg = string.Empty; DateTime date = Convert.ToDateTime(DateTrx); if (paymentData != null) { pData = JsonConvert.DeserializeObject <List <Dictionary <string, string> > >(paymentData); } if (cashData != null) { cData = JsonConvert.DeserializeObject <List <Dictionary <string, string> > >(cashData); } if (paymentData != null) { iData = JsonConvert.DeserializeObject <List <Dictionary <string, string> > >(invoiceData); } PaymentAllocation payments = new PaymentAllocation(ct); msg = payments.SavePaymentData(pData, cData, iData, currency, isCash, _C_BPartner_ID, _windowNo, payment, date, appliedamt, discount, writeOff, open, Convert.ToDateTime(DateAcct), _CurrencyType_ID); return(msg); }
public JsonResult GetCurrencyPrecision(int _C_Currency_ID) { Ctx ct = Session["ctx"] as Ctx; PaymentAllocation payments = new PaymentAllocation(ct); return(Json(JsonConvert.SerializeObject(payments.GetCurrencyPrecision(_C_Currency_ID)), JsonRequestBehavior.AllowGet)); }
/// <summary> /// Get all Organization which are accessable by login user /// </summary> /// <returns>AD_Org_ID and Organization Name</returns> //Added by manjot on 27/02/2019 public JsonResult GetOrganization() { Ctx ct = Session["ctx"] as Ctx; PaymentAllocation payments = new PaymentAllocation(ct); return(Json(JsonConvert.SerializeObject(payments.GetOrganization(ct)), JsonRequestBehavior.AllowGet)); }
//Added new parameters---Neha--- /// <summary> /// To get all the invoices /// </summary> /// <param name="_C_Currency_ID">Currency ID</param> /// <param name="_C_BPartner_ID"> Business Partner ID</param> /// <param name="isInterBPartner">bool Value </param> /// <param name="chk">bool Value </param> /// <param name="date">Transaction Date</param> /// <param name="page">Page Number</param> /// <param name="size">Total Page Size</param> /// <param name="docNo">Document Number</param> /// <param name="c_docType_ID">Document Type ID</param> /// <param name="fromDate">From Date</param> /// <param name="toDate">To Date</param> /// <param name="conversionDate">ConversionType Date</param> /// <returns></returns> public JsonResult GetInvoice(int _C_Currency_ID, int _C_BPartner_ID, bool isInterBPartner, bool chk, string date, int page, int size, string docNo, int c_docType_ID, DateTime?fromDate, DateTime?toDate, string conversionDate) { Ctx ct = Session["ctx"] as Ctx; PaymentAllocation payments = new PaymentAllocation(ct); return(Json(JsonConvert.SerializeObject(payments.GetInvoice(_C_Currency_ID, _C_BPartner_ID, isInterBPartner, chk, date, page, size, docNo, c_docType_ID, fromDate, toDate, conversionDate)), JsonRequestBehavior.AllowGet)); }
public JsonResult GetDocType() { Ctx ct = Session["ctx"] as Ctx; PaymentAllocation payments = new PaymentAllocation(ct); return(Json(JsonConvert.SerializeObject(payments.GetDocType()))); }
public string saveGLJData(string paymentData, string invoiceData, string cashData, string glData, string DateTrx, string _windowNo, int C_Currency_ID, int C_BPartner_ID, string AD_Org_ID, int C_CurrencyType_ID, string DateAcct, string applied, string discount, string open, string payment, string writeOff, string conversionDate, bool chk) { List <Dictionary <string, string> > pData = null; List <Dictionary <string, string> > cData = null; List <Dictionary <string, string> > gData = null; List <Dictionary <string, string> > iData = null; Ctx ct = Session["ctx"] as Ctx; string msg = string.Empty; DateTime date = Convert.ToDateTime(DateTrx); DateTime dateAcct = Convert.ToDateTime(DateAcct); if (paymentData != null) { pData = JsonConvert.DeserializeObject <List <Dictionary <string, string> > >(paymentData); } if (cashData != null) { cData = JsonConvert.DeserializeObject <List <Dictionary <string, string> > >(cashData); } if (glData != null) { gData = JsonConvert.DeserializeObject <List <Dictionary <string, string> > >(glData); } if (invoiceData != null) { iData = JsonConvert.DeserializeObject <List <Dictionary <string, string> > >(invoiceData); } PaymentAllocation payments = new PaymentAllocation(ct); msg = payments.SaveGLData(pData, iData, cData, gData, date, Util.GetValueOfInt(_windowNo), Util.GetValueOfInt(C_Currency_ID), Util.GetValueOfInt(C_BPartner_ID), Util.GetValueOfInt(AD_Org_ID), Util.GetValueOfInt(C_CurrencyType_ID), dateAcct, applied, discount, open, payment, writeOff, Convert.ToDateTime(conversionDate), Util.GetValueOfBool(chk)); return(msg); }
public JsonResult GetCashJounral(int _C_Currency_ID, int _C_BPartner_ID, bool isInterBPartner, bool chk, int page, int size) { Ctx ct = Session["ctx"] as Ctx; PaymentAllocation payments = new PaymentAllocation(ct); return(Json(JsonConvert.SerializeObject(payments.GetCashJounral(_C_Currency_ID, _C_BPartner_ID, isInterBPartner, chk, page, size)), JsonRequestBehavior.AllowGet)); }
/// <summary> /// To get all the unallocated GL Lines /// <param name="AD_Org_ID"> Organization ID </param> /// <param name="_C_Currency_ID">Currency</param> /// <param name="_C_BPartner_ID">Business Partner</param> /// <param name="page">Page Number</param> /// <param name="size">Page Size</param> /// <paramref name="fromDate"/>From Date /// <paramref name="toDate"/>To Date /// <paramref name="srchText"/>Search Document No /// <paramref name="chk"/>MultiCurrency /// <returns>No of unallocated GL Lines</returns> public JsonResult GetGLData(int AD_Org_ID, int _C_Currency_ID, int _C_BPartner_ID, int page, int size, DateTime?fromDate, DateTime?toDate, string srchText, bool chk) { Ctx ct = Session["ctx"] as Ctx; PaymentAllocation payments = new PaymentAllocation(ct); return(Json(JsonConvert.SerializeObject(payments.GetGLData(AD_Org_ID, _C_Currency_ID, _C_BPartner_ID, page, size, fromDate, toDate, srchText, chk)), JsonRequestBehavior.AllowGet)); }
/// <summary> /// To get all the unallocated payments /// </summary> /// <param name="AD_Org_ID">Organization ID</param> /// <param name="_C_Currency_ID">Currency</param> /// <param name="_C_BPartner_ID">Business Partner</param> /// <param name="isInterBPartner">Inter-Business Partner</param> /// <param name="chk">For MultiCurrency Check</param> /// <param name="page">Page Number</param> /// <param name="size">Page Size</param> /// <param name="c_docType_ID">DocType ID</param> /// <param name="docBaseType">DocBaseType</param> /// <param name="fromDate">From Date</param> /// <param name="toDate">to Date</param> /// <param name="srchText">Search Document No</param> /// <returns>No of unallocated payments</returns> public JsonResult GetPayments(int AD_Org_ID, int _C_Currency_ID, int _C_BPartner_ID, bool isInterBPartner, bool chk, int page, int size, int c_docType_ID, string docBaseType, DateTime?fromDate, DateTime?toDate, string srchText) { Ctx ct = Session["ctx"] as Ctx; PaymentAllocation payments = new PaymentAllocation(ct); return(Json(JsonConvert.SerializeObject(payments.GetPayments(AD_Org_ID, _C_Currency_ID, _C_BPartner_ID, isInterBPartner, chk, page, size, c_docType_ID, docBaseType, fromDate, toDate, srchText)), JsonRequestBehavior.AllowGet)); }
/// <summary> /// To get all the unallocated GL Lines /// <param name="_C_Currency_ID">Currency</param> /// <param name="_C_BPartner_ID">Business Partner</param> /// <param name="page">Page Number</param> /// <param name="size">Page Size</param> /// <returns>No of unallocated GL Lines</returns> public JsonResult GetGLData(int _C_Currency_ID, int _C_BPartner_ID, int page, int size) { Ctx ct = Session["ctx"] as Ctx; PaymentAllocation payments = new PaymentAllocation(ct); return(Json(JsonConvert.SerializeObject(payments.GetGLData(_C_Currency_ID, _C_BPartner_ID, page, size)), JsonRequestBehavior.AllowGet)); }
public PaymentAllocation PaymentAllocation(PaymentAllocation payment) { _context.PaymentAllocations.Add(payment); Save(); return(payment); }
public string CheckPeriodState(string DateTrx) { Ctx ct = Session["ctx"] as Ctx; DateTime date = Convert.ToDateTime(DateTrx); PaymentAllocation payments = new PaymentAllocation(ct); return(payments.CheckPeriodState(date)); }
public PaymentAllocation Allocate(PaymentAllocation paymentAllocation) { var result = _paymentRepository.PaymentAllocation(paymentAllocation); return(result); }