コード例 #1
0
        public void GetCreditNote(object param)
        {
            if (param != null)
            {
                CreditNoteForm pqf = dnRepository.GetCreditNoteDetails(Convert.ToString(param));

                this.ID                      = pqf.CreditNote.ID;
                this.CreditNo                = pqf.CreditNote.CreditNo;
                this.CreditDate              = pqf.CreditNote.CreditDate;
                this.CustomerDebitNoteNo     = pqf.CreditNote.CustomerDebitNoteNo;
                this.CustomerDebitNoteDate   = pqf.CreditNote.CustomerDebitNoteDate;
                this.CustomerDebitNoteAmount = pqf.CreditNote.CustomerDebitNoteAmount;
                this.SelectedCustomerID      = pqf.CreditNote.CustomerID;
                this.SalesInvoiceID          = pqf.CreditNote.SalesInvoiceID;
                this.SalesInvoiceNo          = pqf.CreditNote.SalesInvoiceNo;
                this.TermsAndConditions      = pqf.CreditNote.TermsAndConditions;

                this.TotalBeforeTax    = pqf.CreditNote.TotalBeforeTax;
                this.TotalTax          = pqf.CreditNote.TotalTax;
                this.TotalAfterTax     = pqf.CreditNote.TotalAfterTax;
                this.TotalBeforeTaxStr = Convert.ToString(this.TotalBeforeTax);
                this.TotalTaxStr       = Convert.ToString(TotalTax);
                this.TotalAfterTaxStr  = Convert.ToString(TotalAfterTax);

                this.Status = pqf.CreditNote.Status;


                this.PQDetailsEntity = new ObservableCollection <DataGridViewModel>();
                foreach (var item in pqf.InvoiceDetails)
                {
                    DataGridViewModel pqEntity = new DataGridViewModel(ProductList);
                    pqEntity.SelectedPSID = Convert.ToString(item.SINo);
                    pqEntity.PandSCode    = item.PandSCode;
                    pqEntity.PandSName    = item.PandSName;
                    pqEntity.GSTRate      = item.GSTRate;
                    pqEntity.SQQty        = item.SIQty;
                    pqEntity.SQPrice      = Convert.ToString(item.Price);
                    pqEntity.SQDiscount   = item.SIDiscount;

                    //  PQDEntity.GSTRate = item.GSTRate;
                    pqEntity.SQAmount = item.SIAmount;

                    PQDetailsEntity.Add(pqEntity);
                }
            }
        }
コード例 #2
0
        public void GetCreditNote(object param)
        {
            OptionsEntity             oData = new OptionsEntity();
            ISalesOrderListRepository purchaseRepository = new SalesOrderListRepository();

            oData = purchaseRepository.GetOptionSettings();
            if (param != null)
            {
                CreditNoteForm pqf = dnRepository.GetCreditNoteDetails(Convert.ToString(param));

                this.ID                  = pqf.CreditNote.ID;
                this.CreditNo            = pqf.CreditNote.CreditNo;
                this.CreditDate          = pqf.CreditNote.CreditDate;
                this.CustomerDebitNoteNo = pqf.CreditNote.CustomerDebitNoteNo;

                if (CustomerDebitNoteDate == null)
                {
                    this.CustomerDebitNoteDate = pqf.CreditNote.CustomerDebitNoteDate;
                }
                else
                {
                    DateTime DateinStr = (DateTime)pqf.CreditNote.CustomerDebitNoteDate;
                    this.CustomerDebitNoteDateStr = DateinStr.ToString(oData.DateFormat);
                }

                this.CustomerDebitNoteAmount = pqf.CreditNote.CustomerDebitNoteAmount;
                this.SelectedCustomerID      = pqf.CreditNote.CustomerID;
                this.SalesInvoiceID          = pqf.CreditNote.SalesInvoiceID;
                this.SalesInvoiceNo          = pqf.CreditNote.SalesInvoiceNo;
                this.TermsAndConditions      = pqf.CreditNote.TermsAndConditions;

                this.TotalBeforeTax    = Convert.ToDecimal(pqf.CreditNote.TotalBeforeTax);
                this.TotalTax          = Convert.ToDecimal(pqf.CreditNote.TotalTax);
                this.TotalAfterTax     = Convert.ToDecimal(pqf.CreditNote.TotalAfterTax);
                this.TotalBeforeTaxStr = Convert.ToString(this.TotalBeforeTax);
                this.TotalTaxStr       = Convert.ToString(TotalTax);
                this.TotalAfterTaxStr  = Convert.ToString(TotalAfterTax);

                this.Status = pqf.CreditNote.Status;
                if (this.Status == 1)
                {
                    RubberAdjusted = true;
                }

                this.PQDetailsEntity = new ObservableCollection <DataGridViewModel>();
                foreach (var item in pqf.InvoiceDetails)
                {
                    DataGridViewModel pqEntity = new DataGridViewModel(ProductList);
                    pqEntity.SelectedPSID = Convert.ToString(item.SINo);
                    pqEntity.PandSCode    = item.PandSCode;
                    pqEntity.PandSName    = item.PandSName;
                    pqEntity.GSTRate      = item.GSTRate;
                    pqEntity.SQQty        = item.SIQty;
                    pqEntity.SQPrice      = Convert.ToString(item.Price);
                    pqEntity.SQDiscount   = item.SIDiscount;

                    //  PQDEntity.GSTRate = item.GSTRate;
                    pqEntity.SQAmount = item.SIAmount;

                    PQDetailsEntity.Add(pqEntity);
                }
            }
        }