{
add_comments(ST_JOURNAL, $trans_no, $date, $memo);
if ($ref == "")
- $ref = $Refs->get_next(ST_JOURNAL);
+ $ref = $Refs->get_next(ST_JOURNAL, null, $date);
$Refs->save(ST_JOURNAL, $trans_no, $ref);
add_audit_trail(ST_JOURNAL, $trans_no, $date);
}
}
if ($exchanged == true)
{
- $ref1 = $Refs->get_next(ST_JOURNAL);
+ $ref1 = $Refs->get_next(ST_JOURNAL, null, $date_);
$Refs->save(ST_JOURNAL, $trans_no1, $ref1);
add_audit_trail(ST_JOURNAL, $trans_no1, $date_);
}
if ($exchanged || add_exchange_variation($trans_no1, $date_, $from_account, $bank_gl_account,
$currency, $person_type_id, $person_id))
{
- $ref1 = $Refs->get_next(ST_JOURNAL);
+ $ref1 = $Refs->get_next(ST_JOURNAL, null, $date_);
$Refs->save(ST_JOURNAL, $trans_no1, $ref1);
add_audit_trail(ST_JOURNAL, $trans_no1, $date_);
}