Exemplo n.º 1
0
        public FormMakePayment(ACMSLogic.POS pos, string paymentGroupCode)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            myPOS = pos;
            myPaymentGroupCodeLookupBuilder = new ACMS.XtraUtils.LookupEditBuilder.PaymentGroupCodeLookupEditBuilder(lkpEdtPaymentGroup.Properties);
            myPaymentCodeLookupBuilder      = new ACMS.XtraUtils.LookupEditBuilder.PaymentCodeLookupEditBuilder(lkpEdtPayment.Properties, paymentGroupCode);
            myPaymentGroupCode = paymentGroupCode;

            if (myPaymentGroupCode == PaymentGroupCode.IPP)
            {
                lkpEdtPayment.Enabled  = false;
                myIPPLookupEditBuilder = new ACMS.XtraUtils.LookupEditBuilder.IPPLookupEditBuilder(lkpEdtIPP.Properties,
                                                                                                   myPOS.StrBranchCode, myPOS.StrMembershipID);

                DataTable ippLookupEditTable = myIPPLookupEditBuilder.GetDataTable();

                DataRow[] ippRowInPayment = pos.ReceiptPaymentTable.Select("nIPPID is Not Null", "", DataViewRowState.CurrentRows);

                if (ippRowInPayment.Length > 0)
                {
                    foreach (DataRow r in ippRowInPayment)
                    {
                        DataRow[] rowsToRemove = ippLookupEditTable.Select("nIPPID = " + r["nIPPID"].ToString());

                        foreach (DataRow removeRow in rowsToRemove)
                        {
                            removeRow.Delete();
                        }
                    }
                }
                //ippLookupEditTable.Select("nIPPID = "
            }
            if (myPaymentGroupCode == PaymentGroupCode.CASH ||
                myPaymentGroupCode == PaymentGroupCode.NETS)
            {
                label5.Visible      = false;
                txtEdtRefNo.Visible = false;
//				decimal remainder = myPOS.MTotalAmount % ACMS.Convert.ToDecimal(0.05);
//				myPOS.MTotalAmount = myPOS.MTotalAmount - remainder;
//				txtEdtPaymentAmt.EditValue = myPOS.MTotalAmount.ToString();
            }
        }
Exemplo n.º 2
0
        public FormMakePayment(ACMSLogic.POS pos, string paymentGroupCode)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            myPOS = pos;
            myPaymentGroupCodeLookupBuilder = new ACMS.XtraUtils.LookupEditBuilder.PaymentGroupCodeLookupEditBuilder(lkpEdtPaymentGroup.Properties);
            myPaymentCodeLookupBuilder = new ACMS.XtraUtils.LookupEditBuilder.PaymentCodeLookupEditBuilder(lkpEdtPayment.Properties, paymentGroupCode);
            myPaymentGroupCode = paymentGroupCode;

            if (myPaymentGroupCode == PaymentGroupCode.IPP)
            {
                lkpEdtPayment.Enabled = false;
                myIPPLookupEditBuilder = new ACMS.XtraUtils.LookupEditBuilder.IPPLookupEditBuilder(lkpEdtIPP.Properties,
                    myPOS.StrBranchCode, myPOS.StrMembershipID);

                DataTable ippLookupEditTable = myIPPLookupEditBuilder.GetDataTable();

                DataRow[] ippRowInPayment = pos.ReceiptPaymentTable.Select("nIPPID is Not Null", "", DataViewRowState.CurrentRows);

                if (ippRowInPayment.Length > 0)
                {
                    foreach (DataRow r in ippRowInPayment)
                    {
                        DataRow[] rowsToRemove = ippLookupEditTable.Select("nIPPID = " + r["nIPPID"].ToString());

                        foreach (DataRow removeRow in rowsToRemove)
                        {
                            removeRow.Delete();
                        }
                    }
                }
                //ippLookupEditTable.Select("nIPPID = "
            }
            else if (myPaymentGroupCode == PaymentGroupCode.CASH ||
                myPaymentGroupCode == PaymentGroupCode.NETS)
            {
                label5.Visible = false;
                txtEdtRefNo.Visible = false;
            //				decimal remainder = myPOS.MTotalAmount % ACMS.Convert.ToDecimal(0.05);
            //				myPOS.MTotalAmount = myPOS.MTotalAmount - remainder;
            //				txtEdtPaymentAmt.EditValue = myPOS.MTotalAmount.ToString();
            }
        }