Example #1
0
        public int GetBatchId()
        {
            MVA009PaymentMethod paym  = new MVA009PaymentMethod(GetCtx(), _paymentMethod, Get_TrxName());
            MVA009Batch         batch = new MVA009Batch(GetCtx(), 0, Get_TrxName());

            batch.SetAD_Client_ID(GetCtx().GetAD_Client_ID());
            batch.SetAD_Org_ID(GetCtx().GetAD_Org_ID());
            batch.SetC_Bank_ID(_C_Bank_ID);
            batch.SetC_BankAccount_ID(_C_BankAccount_ID);
            batch.SetVA009_PaymentMethod_ID(_paymentMethod);
            batch.SetVA009_PaymentRule(paym.GetVA009_PaymentRule());
            batch.SetVA009_PaymentTrigger(paym.GetVA009_PaymentTrigger());
            batch.SetVA009_DocumentDate(DateTime.Now);
            if (!batch.Save())
            {
                batchid = 0;
            }
            return(batch.GetVA009_Batch_ID());
        }