Attachments (more than one) do not follow the transaction after editing. Fixed.
authorJoe <joe.hunt.consulting@gmail.com>
Thu, 27 Jun 2024 10:53:48 +0000 (12:53 +0200)
committerJoe <joe.hunt.consulting@gmail.com>
Thu, 27 Jun 2024 10:53:48 +0000 (12:53 +0200)
gl/includes/db/gl_db_banking.inc
gl/includes/db/gl_journal.inc

index 157d59d5fb228091c6caad11fb08df9a0ac142d3..e7fa811daaf852c8b24c6fae4a47eb7092ad6056 100644 (file)
@@ -451,9 +451,10 @@ function write_bank_transaction($trans_type, $trans_no, $from_account, $items, $
     }
        if ($aid != 0)
        {
     }
        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
 
        }
        // do the source account postings
 
index 88a8553da80448729b6be1e8a37e16f28c6e3596..01eefaf481011917d39cdb6c7d1a1ef67a326c05 100644 (file)
@@ -124,9 +124,10 @@ function write_journal_entries(&$cart)
                $aid = has_attachment($trans_type, $old_no);
                if ($aid != 0)
                {
                $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']);
                }
 
        }       
                }
 
        }