From: Joe Date: Thu, 27 Jun 2024 10:53:48 +0000 (+0200) Subject: Attachments (more than one) do not follow the transaction after editing. Fixed. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=6368404125a25ef75691791087070cb3044b1689;p=fa-stable.git Attachments (more than one) do not follow the transaction after editing. Fixed. --- diff --git a/gl/includes/db/gl_db_banking.inc b/gl/includes/db/gl_db_banking.inc index 157d59d5..e7fa811d 100644 --- a/gl/includes/db/gl_db_banking.inc +++ b/gl/includes/db/gl_db_banking.inc @@ -451,9 +451,10 @@ function write_bank_transaction($trans_type, $trans_no, $from_account, $items, $ } if ($aid != 0) { - $row = get_attachment($aid); - update_attachment($aid, $row['type_no'], $trans_no, $row['description'], - $row['filename'], $row['unique_name'], $row['filesize'], $row['filetype']); + move_trans_attachments($trans_type, $old_trans, $trans_no); + //$row = get_attachment($aid); + //update_attachment($aid, $row['type_no'], $trans_no, $row['description'], + // $row['filename'], $row['unique_name'], $row['filesize'], $row['filetype']); } // do the source account postings diff --git a/gl/includes/db/gl_journal.inc b/gl/includes/db/gl_journal.inc index 88a8553d..01eefaf4 100644 --- a/gl/includes/db/gl_journal.inc +++ b/gl/includes/db/gl_journal.inc @@ -124,9 +124,10 @@ function write_journal_entries(&$cart) $aid = has_attachment($trans_type, $old_no); if ($aid != 0) { - $row = get_attachment($aid); - update_attachment($aid, $row['type_no'], $trans_id, $row['description'], - $row['filename'], $row['unique_name'], $row['filesize'], $row['filetype']); + move_trans_attachments($trans_type, $old_no, $trans_id); + //$row = get_attachment($aid); + //update_attachment($aid, $row['type_no'], $trans_id, $row['description'], + // $row['filename'], $row['unique_name'], $row['filesize'], $row['filetype']); } }