예제 #1
0
 public Form_DocInvoice_AddOn(DocInvoice_AddOn x_DocInvoice_AddOn,bool x_bPrint, usrc_AddOn x_usrc_AddOn)
 {
     InitializeComponent();
     this.m_AddOnDI = x_DocInvoice_AddOn;
     m_usrc_AddOn = x_usrc_AddOn;
     m_bPrint = x_bPrint;
     this.Text = lngRPM.s_PaymentOfInvoiceAndPrint.s;
 }
 public Form_DocProformaInvoice_AddOn(DocProformaInvoice_AddOn x_AddOnDPI, bool bxPrint, usrc_AddOn xusrc_AddOn)
 {
     InitializeComponent();
     m_AddOnDPI = x_AddOnDPI;
     m_bPrint = bxPrint;
     m_usrc_AddOn = xusrc_AddOn;
     this.Text = lngRPM.s_PaymentOfProformaInvoiceAndPrint.s;
 }
예제 #3
0
 public Form_Notice(usrc_AddOn usrc_Notice)
 {
     InitializeComponent();
     this.usrc_Notice = usrc_Notice;
 }
예제 #4
0
        //, int xCurrency_DecimalPlaces, decimal xGrossSum)
        public bool Init(DocInvoice_AddOn x_AddOnDI, bool bxPrint, usrc_AddOn x_usrc_AddOn)
        {
            Enable_BankAccountTransfer(false);
            m_AddOnDI = x_AddOnDI;
            m_bPrint = bxPrint;
            m_usrc_AddOn = x_usrc_AddOn;
            if (m_bPrint)
            {
                lngRPM.s_Print.Text(this.btn_Print);
            }
            else
            {
                this.btn_Print.Text = "OK";
            }
            if (m_AddOnDI.Get(m_usrc_AddOn.m_usrc_Invoice.m_ShopABC.m_CurrentInvoice.Doc_ID))
            {
                if (m_AddOnDI.m_IssueDate != null)
                {
                    dtP_DateOfIssue.Value = m_AddOnDI.m_IssueDate.Date;
                }

                if (m_AddOnDI.m_PaymentDeadline != null)
                {
                    dtP_PaymentDeadline.Value = m_AddOnDI.m_PaymentDeadline.Date;
                }

                if (m_AddOnDI.m_MethodOfPayment != null)
                {
                    switch (m_AddOnDI.m_MethodOfPayment.eType)
                    {
                        case GlobalData.ePaymentType.CASH:
                            rdb_Cash.Checked = true;
                            break;
                        case GlobalData.ePaymentType.PAYMENT_CARD:
                            rdb_CARD.Checked = true;
                            break;
                        case GlobalData.ePaymentType.CASH_OR_PAYMENT_CARD:
                            rdb_Cash.Checked = true;
                            break;
                        case GlobalData.ePaymentType.BANK_ACCOUNT_TRANSFER:
                            rdb_BankAccountTransfer.Checked = true;
                            txt_BankAccount.Text = SetBankAccountText();
                            Enable_BankAccountTransfer(true);
                            break;
                    }
                }
                if (m_AddOnDI.m_TermsOfPayment != null)
                {
                    txt_PaymantConditionsDescription.Text = m_AddOnDI.m_TermsOfPayment.Description;
                }

                return true;
            }
            else
            {
                return false;
            }
        }
        //, int xCurrency_DecimalPlaces, decimal xGrossSum)
        public bool Init(DocProformaInvoice_AddOn x_AddOnDI,bool bxPrint, usrc_AddOn x_usrc_AddOn)
        {
            //m_InvoiceData = xInvoiceData;
            m_AddOnDPI = x_AddOnDI;
            m_bPrint = bxPrint;
            m_usrc_AddOn = x_usrc_AddOn;
            if (m_bPrint)
            {
                lngRPM.s_Print.Text(this.btn_Print);
            }
            else
            {
                lngRPM.s_OK.Text(this.btn_Print);
            }

            if (m_AddOnDPI.Get(m_usrc_AddOn.m_usrc_Invoice.m_ShopABC.m_CurrentInvoice.Doc_ID))
            {
                if (m_AddOnDPI.m_IssueDate != null)
                {
                    dtP_DateOfIssue.Value = m_AddOnDPI.m_IssueDate.Date;
                }
                if (m_AddOnDPI.m_MethodOfPayment != null)
                {
                    switch (m_AddOnDPI.m_MethodOfPayment.eType)
                    {
                        case GlobalData.ePaymentType.CASH:
                        case GlobalData.ePaymentType.PAYMENT_CARD:
                        case GlobalData.ePaymentType.CASH_OR_PAYMENT_CARD:
                            rdb_Payment_by_cash_or_credit_card_on_delivery.Checked = true;
                            break;
                        case GlobalData.ePaymentType.BANK_ACCOUNT_TRANSFER:
                            rdb_BankAccountTransfer.Checked = true;
                            txt_BankAccount.Text = SetBankAccountText();
                            break;
                    }
                }
                if (m_AddOnDPI.m_TermsOfPayment != null)
                {
                    txt_PaymantConditionsDescription.Text = m_AddOnDPI.m_TermsOfPayment.Description;
                }
                if (m_AddOnDPI.m_Duration != null)
                {
                    switch (m_AddOnDPI.m_Duration.type)
                    {
                        case 0: //length in months
                            rdb_ValidNumberOf.Checked = true;
                            cmb_DaysOrMonths.SelectedIndex = 0;
                            nmUpDn_NumberOfDaysOrMonths.Value = m_AddOnDPI.m_Duration.length;
                            dtP_TenderValidUntil.Value = m_AddOnDPI.m_IssueDate.Date.AddMonths((Convert.ToInt32(m_AddOnDPI.m_Duration.length)));
                            break;
                        case 1: //length in days
                            rdb_ValidNumberOf.Checked = true;
                            cmb_DaysOrMonths.SelectedIndex = 1;
                            nmUpDn_NumberOfDaysOrMonths.Value = m_AddOnDPI.m_Duration.length;
                            dtP_TenderValidUntil.Value = m_AddOnDPI.m_IssueDate.Date.AddDays((Convert.ToInt32(m_AddOnDPI.m_Duration.length)));
                            break;
                        case 2: //days from IssueDate to end date
                            rdb_Valid_Tender_Until.Checked = true;
                            cmb_DaysOrMonths.SelectedIndex = 1;
                            nmUpDn_NumberOfDaysOrMonths.Value = m_AddOnDPI.m_Duration.length;
                            dtP_TenderValidUntil.Value = m_AddOnDPI.m_IssueDate.Date.AddDays((Convert.ToInt32(m_AddOnDPI.m_Duration.length)));
                            break;
                    }

                }
                return true;
            }
            else
            {
                return false;
            }
        }