Skip to content

Commit

Permalink
Import Transactions: mysql_fetch_assoc => db_fetch_assoc and Filter Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
apmuthu committed Jul 1, 2017
1 parent c38916d commit 33822bf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Extensions/import_transactions/_init/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Package: import_transactions
Version: 2.4.0-2
Name: Import Transactions
Description: Import transactions from csv in journal format, payment format, deposit format, or adapted bank statement format.
Features include a trial check before importing, tabular display of journal entries, importing of bank statements with additional
Expand All @@ -7,13 +8,12 @@ Description: Import transactions from csv in journal format, payment format, dep
display notifications identifying how tables within the database are being affected for a more transparent display,
additional lookup tools for looking up customer id's, supplier id's, company setup information eg. fiscal year,
tools that users will find useful for inclusion in their spreadsheet prior to conversion to csv,
and suitable validation checks for customers, suppliers, tax codes, references.
and suitable validation checks for customers, suppliers, tax codes, references. Single and Multi Line Invoices now supported.
Author: Ross Addison <ross@bbqq.co.uk>
Maintenance: Ross Addison <frontaccounting@bbqq.co.uk>
Homepage: frontaccounting.com
Depends:
Type: extension
InstallPath: modules/import_transactions
Filename: import_transactions-2.4.0-2
Version: 2.4.0-2

26 changes: 13 additions & 13 deletions Extensions/import_transactions/_init/files
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/import_transactions.php: 30ff6aac2dde4d293b8c48f8d97418ce8d495700
/spreadsheet_headers.doc: 7dd9ccf959f34b7fa9a3cb13b0365b835916441b
/_init/config: 1a93590304b764c29078b6a2764d12f2dc32bea1
/LICENSE: 23a1f87d806ce0330b3d85485e399a5f9f553409
/includes/import_sales_order_entry.inc: 313b0d5b2f70959eb50ae201fc6e13947a14a119
/includes/import_transactions.inc: 7b38f4875eee5a5518cb4e1e29d9716df6f2c7e1
/includes/import_sales_order_ui.inc: c488744c5f5bf82e86d985c3230cd266f4bef451
/includes/import_sales_cart_class.inc: 6abba0b4b39474f53c723683b0bedde07c7b4422
/hooks.php: 1c10e29a16f4b057d0517dc07724e76c5e7f00f9
/templates/salesinvoices_two_invoices_multiitems_credit_sale_paymentid1.csv: 80aef05fd1e35f261976ffb59bd4f1b5b838eec2
/templates/salesinvoices_two_invoices_multiitems_cash_sale_paymentid4.csv: 0bf65efbe920b356cf2f500d3ce9c608d8ca09b0
/templates/payment_en_GB.csv: 1cae388c86c4041363d5f755d91af69fdeb370de
/templates/single_line_salesinvoices.csv: 24156ed70434f12ef96184053253252f75731ec2
/templates/deposit_en_GB.csv: 9e61e2dc23b5851b150e0e9b07d9875cf03a9594
/templates/journal_en_GB.csv: 9fb79e9f2e974d81c5148d2234ec2ed738a2c3b6
/templates/salesinvoices_two_invoices_multiitems_credit_sale_paymentid1.csv: 80aef05fd1e35f261976ffb59bd4f1b5b838eec2
/templates/salesinvoices_two_invoices_multiitems_cash_sale_paymentid4.csv: 0bf65efbe920b356cf2f500d3ce9c608d8ca09b0
/templates/bank_en_GB.csv: 27959de85649429a5e4b720f10d9ae1d45f44038
/templates/payment_en_GB.csv: 1cae388c86c4041363d5f755d91af69fdeb370de
/README.md: 9775c8a70aeb4baf85da746891007bec5c51bcbc
/import_transactions.php: 30ff6aac2dde4d293b8c48f8d97418ce8d495700
/LICENSE: 23a1f87d806ce0330b3d85485e399a5f9f553409
/includes/import_transactions.inc: af73b8e5e17de7d4f972ebb52437722432c127c4
/includes/import_sales_cart_class.inc: 6abba0b4b39474f53c723683b0bedde07c7b4422
/includes/import_sales_order_ui.inc: c488744c5f5bf82e86d985c3230cd266f4bef451
/includes/import_sales_order_entry.inc: 313b0d5b2f70959eb50ae201fc6e13947a14a119
/spreadsheet_headers.html: 21bf4f4c7a77709dc90b5898bf1913acca16ea44
/spreadsheet_headers.doc: 7dd9ccf959f34b7fa9a3cb13b0365b835916441b
/hooks.php: 1c10e29a16f4b057d0517dc07724e76c5e7f00f9
/_init/config: 1f5ae6903f7f6ec80a54f3d9132dc6f64aa239c1
/README.md: 9775c8a70aeb4baf85da746891007bec5c51bcbc

10 changes: 5 additions & 5 deletions Extensions/import_transactions/includes/import_transactions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -630,26 +630,26 @@ function last_transno($type)
//'get last row's typeno since type_no is the trans no'
if ($type == ST_BANKDEPOSIT || $type == ST_BANKPAYMENT)
{
$sql = "SELECT id, type, trans_no, amount FROM ".TB_PREF."bank_trans ORDER BY id DESC LIMIT 1";
$sql = "SELECT id, `type`, trans_no, amount FROM ".TB_PREF."bank_trans WHERE `type` =".$type." ORDER BY id DESC LIMIT 1";
$result = db_query($sql, _("Cannot locate last entry"));
$row = mysql_fetch_assoc($result);
$row = db_fetch_assoc($result);
$rowtrans = $row['trans_no'];
} // end if

if ($type == ST_JOURNAL)
{
$sql = "SELECT counter, type, type_no, amount FROM ".TB_PREF."gl_trans ORDER BY counter DESC LIMIT 1";
$result = db_query($sql, _("Cannot locate last entry"));
$row = mysql_fetch_assoc($result);
$row = db_fetch_assoc($result);
$rowtrans = $row['type_no'];
} // end if

if (($type == ST_SALESORDER) || ($type == ST_SALESINVOICE))
{

$sql = "SELECT trans_no,type FROM ".TB_PREF."debtor_trans ORDER BY trans_no DESC LIMIT 1";
$sql = "SELECT trans_no, `type` FROM ".TB_PREF."debtor_trans WHERE `type` =".$type." ORDER BY trans_no DESC LIMIT 1";
$result = db_query($sql, _("Cannot locate last entry"));
$row = mysql_fetch_assoc($result);
$row = db_fetch_assoc($result);
$rowtrans = $row['trans_no'];
}
return $rowtrans;//
Expand Down

0 comments on commit 33822bf

Please sign in to comment.