Esempio n. 1
0
        }   //	completeOrder

        /// <summary>
        /// to get the payment method if no payment method found on the business partner
        /// </summary>
        /// <returns>returns payment meyhod ID</returns>
        public int GetPaymentMethod()
        {
            //get organisation default
            //added IsActive condition to check weather the paymentmethod is active or not
            string sql = "SELECT VA009_PaymentMethod_ID FROM VA009_PaymentMethod WHERE VA009_PAYMENTBASETYPE='S' AND AD_ORG_ID IN(@param1,0) AND AD_Client_ID=" + tel.GetAD_Client_ID() + "  AND IsActive='Y' ORDER BY AD_ORG_ID DESC, VA009_PAYMENTMETHOD_ID DESC";

            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("@param1", tel.GetAD_Org_ID());
            dynamic pri = DataBase.DB.ExecuteScalar(sql, param, Get_TrxName());

            return(Convert.ToInt32(pri));
        }