Audit Trail: regression in audit history (after sql strict mode related changes)...
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 3 Jul 2019 09:51:16 +0000 (11:51 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 3 Jul 2019 10:50:08 +0000 (12:50 +0200)
includes/db/audit_trail_db.inc

index feb85a991f744b6ed3facf54fd4fffaff18d7964..2714448ed25d8215a76b6a642c3e138a335d9da2 100644 (file)
@@ -26,7 +26,7 @@ function add_audit_trail($trans_type, $trans_no, $trans_date, $descr='')
        // to avoid need for subqueries (not existing in MySQL 3) all over the code
        $sql = "UPDATE ".TB_PREF."audit_trail audit LEFT JOIN ".TB_PREF."fiscal_year year ON year.begin<='$date' AND year.end>='$date'
                SET audit.gl_seq = IF(audit.id=".db_insert_id().", 0, NULL),"
-               ."audit.fiscal_year=year.id, stamp=CURRENT_TIMESTAMP"
+               ."audit.fiscal_year=year.id"
                . " WHERE type=".db_escape($trans_type)." AND trans_no="
                . db_escape($trans_no);