Beispiel #1
0
        public ReceiptItem FindReceiptItemByCIJ(int CIId)
        {
            string sql = ReceiptItem.GetCustomerInvoiceBySOIID(CIId, VendorBalanceEntryType.CustomerInvoice);

            m_command.CommandText = sql;
            MySql.Data.MySqlClient.MySqlDataReader r = m_command.ExecuteReader();
            ReceiptItem rest = ReceiptItem.TransformReader(r);

            r.Close();
            return(rest);
        }
Beispiel #2
0
        internal static IList FindPaidCustomerInvoice(MySql.Data.MySqlClient.MySqlCommand cmd, int siID)
        {
            cmd.CommandText = ReceiptItem.GetCustomerInvoiceBySOIID(siID, VendorBalanceEntryType.CustomerInvoice);
            MySql.Data.MySqlClient.MySqlDataReader r = cmd.ExecuteReader();
            IList result = ReceiptItem.TransformReaderList(r);

            r.Close();
            foreach (ReceiptItem i in result)
            {
                cmd.CommandText = Receipt.GetByIDSQL(i.EVENT_JOURNAL.ID);
                r = cmd.ExecuteReader();
                i.EVENT_JOURNAL = Receipt.TransformReader(r);
                r.Close();
            }
            return(result);
        }