projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New inventory sales report. Shows total sales - costs - contribution per category...
[fa-stable.git]
/
purchasing
/
supplier_invoice.php
diff --git
a/purchasing/supplier_invoice.php
b/purchasing/supplier_invoice.php
index 33afd6c48763c6097ec19ef1543ab02553710796..915ec27c1b3611157927ea6b1c6f5f8c32e5da32 100644
(file)
--- a/
purchasing/supplier_invoice.php
+++ b/
purchasing/supplier_invoice.php
@@
-14,6
+14,8
@@
include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
$js = "";
if ($use_popup_windows)
$js .= get_js_open_window(900, 500);
$js = "";
if ($use_popup_windows)
$js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+ $js .= get_js_date_picker();
page(_("Enter Supplier Invoice"), false, false, "", $js);
page(_("Enter Supplier Invoice"), false, false, "", $js);
@@
-70,34
+72,40
@@
function check_data()
if (!references::is_valid($_SESSION['supp_trans']->reference))
{
display_error(_("You must enter an invoice reference."));
if (!references::is_valid($_SESSION['supp_trans']->reference))
{
display_error(_("You must enter an invoice reference."));
+ set_focus('reference');
return false;
}
if (!is_new_reference($_SESSION['supp_trans']->reference, 20))
{
display_error(_("The entered reference is already in use."));
return false;
}
if (!is_new_reference($_SESSION['supp_trans']->reference, 20))
{
display_error(_("The entered reference is already in use."));
+ set_focus('reference');
return false;
}
if (!references::is_valid($_SESSION['supp_trans']->supp_reference))
{
display_error(_("You must enter a supplier's invoice reference."));
return false;
}
if (!references::is_valid($_SESSION['supp_trans']->supp_reference))
{
display_error(_("You must enter a supplier's invoice reference."));
+ set_focus('supp_reference');
return false;
}
if (!is_date( $_SESSION['supp_trans']->tran_date))
{
display_error(_("The invoice as entered cannot be processed because the invoice date is in an incorrect format."));
return false;
}
if (!is_date( $_SESSION['supp_trans']->tran_date))
{
display_error(_("The invoice as entered cannot be processed because the invoice date is in an incorrect format."));
+ set_focus('trans_date');
return false;
}
elseif (!is_date_in_fiscalyear($_SESSION['supp_trans']->tran_date))
{
display_error(_("The entered date is not in fiscal year."));
return false;
}
elseif (!is_date_in_fiscalyear($_SESSION['supp_trans']->tran_date))
{
display_error(_("The entered date is not in fiscal year."));
+ set_focus('trans_date');
return false;
}
if (!is_date( $_SESSION['supp_trans']->due_date))
{
display_error(_("The invoice as entered cannot be processed because the due date is in an incorrect format."));
return false;
}
if (!is_date( $_SESSION['supp_trans']->due_date))
{
display_error(_("The invoice as entered cannot be processed because the due date is in an incorrect format."));
+ set_focus('due_date');
return false;
}
return false;
}