projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Password reset mail could take several hours. After fix only a couple of seconds...
[fa-stable.git]
/
gl
/
bank_transfer.php
diff --git
a/gl/bank_transfer.php
b/gl/bank_transfer.php
index 7b987636a16162d005e06a133bba6b247720013e..79195b5c99b6df06467232aa987338c6440c6314 100644
(file)
--- a/
gl/bank_transfer.php
+++ b/
gl/bank_transfer.php
@@
-87,14
+87,13
@@
function gl_payment_controls($trans_no)
$_POST['target_amount'] = price_format($to_trans['amount']);
$_POST['amount'] = price_format(-$from_trans['amount']);
} else {
$_POST['target_amount'] = price_format($to_trans['amount']);
$_POST['amount'] = price_format(-$from_trans['amount']);
} else {
- $_POST['ref'] = $Refs->get_next(ST_BANKTRANSFER);
+ $_POST['ref'] = $Refs->get_next(ST_BANKTRANSFER
, null, get_post('DatePaid')
);
$_POST['memo_'] = '';
$_POST['FromBankAccount'] = 0;
$_POST['ToBankAccount'] = 0;
$_POST['amount'] = 0;
}
}
$_POST['memo_'] = '';
$_POST['FromBankAccount'] = 0;
$_POST['ToBankAccount'] = 0;
$_POST['amount'] = 0;
}
}
- $home_currency = get_company_currency();
start_form();
start_form();
@@
-115,7
+114,8
@@
function gl_payment_controls($trans_no)
}
date_row(_("Transfer Date:"), 'DatePaid', '', true, 0, 0, 0, null, true);
}
date_row(_("Transfer Date:"), 'DatePaid', '', true, 0, 0, 0, null, true);
- ref_row(_("Reference:"), 'ref', '', $_POST['ref']);
+ ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_BANKTRANSFER, null, get_post('DatePaid')), false, ST_BANKTRANSFER,
+ array('date' => get_post('DatePaid')));
table_section(2);
table_section(2);
@@
-232,15
+232,8
@@
function check_valid_entries($trans_no)
set_focus('charge');
return false;
}
set_focus('charge');
return false;
}
- if (!$Refs->is_valid($_POST['ref']))
- {
- display_error(_("You must enter a reference."));
- set_focus('ref');
- return false;
- }
- if (! $trans_no && ! is_new_reference($_POST['ref'], ST_BANKTRANSFER)) {
- display_error(_("The entered reference is already in use."));
+ if (!check_reference($_POST['ref'], ST_BANKTRANSFER, $trans_no)) {
set_focus('ref');
return false;
}
set_focus('ref');
return false;
}