本文整理汇总了PHP中is_date_in_fiscalyear函数的典型用法代码示例。如果您正苦于以下问题:PHP is_date_in_fiscalyear函数的具体用法?PHP is_date_in_fiscalyear怎么用?PHP is_date_in_fiscalyear使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_date_in_fiscalyear函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: can_process
function can_process()
{
global $Refs;
if (!is_date($_POST['date_'])) {
display_error(_("The entered date for the issue is invalid."));
set_focus('date_');
return false;
} elseif (!is_date_in_fiscalyear($_POST['date_'])) {
display_error(_("The entered date is not in fiscal year."));
set_focus('date_');
return false;
}
if (!$Refs->is_valid($_POST['ref'])) {
display_error(_("You must enter a reference."));
set_focus('ref');
return false;
}
if (!is_new_reference($_POST['ref'], ST_MANUISSUE)) {
display_error(_("The entered reference is already in use."));
set_focus('ref');
return false;
}
$failed_item = $_SESSION['issue_items']->check_qoh($_POST['Location'], $_POST['date_'], !$_POST['IssueType']);
if ($failed_item != -1) {
display_error(_("The issue cannot be processed because it would cause negative inventory balance for marked items as of document date or later."));
return false;
}
return true;
}
示例2: check_valid_entries
function check_valid_entries()
{
if (!is_date($_POST['DatePaid'])) {
display_error(tr("The entered date is invalid."));
set_focus('DatePaid');
return false;
}
if (!is_date_in_fiscalyear($_POST['DatePaid'])) {
display_error(tr("The entered date is not in fiscal year."));
set_focus('DatePaid');
return false;
}
if (!check_num('amount', 0)) {
display_error(tr("The entered amount is invalid or less than zero."));
set_focus('amount');
return false;
}
if (!references::is_valid($_POST['ref'])) {
display_error(tr("You must enter a reference."));
set_focus('ref');
return false;
}
if (!is_new_reference($_POST['ref'], systypes::bank_transfer())) {
display_error(tr("The entered reference is already in use."));
set_focus('ref');
return false;
}
if ($_POST['FromBankAccount'] == $_POST['ToBankAccount']) {
display_error(tr("The source and destination bank accouts cannot be the same."));
set_focus('ToBankAccount');
return false;
}
return true;
}
示例3: check_data
function check_data()
{
global $Refs;
if (!is_date($_POST['date'])) {
display_error(_("The entered date is invalid."));
set_focus('date');
return false;
}
if (!is_date_in_fiscalyear($_POST['date'])) {
display_error(_("The entered date is not in fiscal year."));
set_focus('date');
return false;
}
if (!$Refs->is_valid($_POST['ref'])) {
display_error(_("You must enter a reference."));
set_focus('ref');
return false;
}
if (!is_new_reference($_POST['ref'], ST_JOURNAL)) {
display_error(_("The entered reference is already in use."));
set_focus('ref');
return false;
}
return true;
}
示例4: can_process
function can_process()
{
if (!is_date($_POST['CreditDate'])) {
display_error(tr("The entered date is invalid."));
set_focus('CreditDate');
return false;
} elseif (!is_date_in_fiscalyear($_POST['CreditDate'])) {
display_error(tr("The entered date is not in fiscal year."));
set_focus('CreditDate');
return false;
}
if ($_SESSION['Items']->trans_no == 0) {
if (!references::is_valid($_POST['ref'])) {
display_error(tr("You must enter a reference."));
set_focus('ref');
return false;
}
if (!is_new_reference($_POST['ref'], 11)) {
display_error(tr("The entered reference is already in use."));
set_focus('ref');
return false;
}
}
if (!check_num('ChargeFreightCost', 0)) {
display_error(tr("The entered shipping cost is invalid or less than zero."));
set_focus('ChargeFreightCost');
return false;
}
return true;
}
示例5: can_process
function can_process()
{
if (!is_date($_POST['date_'])) {
display_error(tr("The entered date for the issue is invalid."));
set_focus('date_');
return false;
} elseif (!is_date_in_fiscalyear($_POST['date_'])) {
display_error(tr("The entered date is not in fiscal year."));
set_focus('date_');
return false;
}
if (!references::is_valid($_POST['ref'])) {
display_error(tr("You must enter a reference."));
set_focus('ref');
return false;
}
if (!is_new_reference($_POST['ref'], 28)) {
display_error(tr("The entered reference is already in use."));
set_focus('ref');
return false;
}
$failed_item = $_SESSION['issue_items']->check_qoh($_POST['Location'], $_POST['date_'], !$_POST['IssueType']);
if ($failed_item != null) {
display_error(tr("The issue cannot be processed because an entered item would cause a negative inventory balance :") . " " . $failed_item->stock_id . " - " . $failed_item->item_description);
return false;
}
return true;
}
示例6: can_process
function can_process()
{
global $Refs;
if (!is_date($_POST['CreditDate'])) {
display_error(_("The entered date is invalid."));
set_focus('CreditDate');
return false;
} elseif (!is_date_in_fiscalyear($_POST['CreditDate'])) {
display_error(_("The entered date is not in fiscal year."));
set_focus('CreditDate');
return false;
}
if ($_SESSION['Items']->trans_no == 0) {
if (!$Refs->is_valid($_POST['ref'])) {
display_error(_("You must enter a reference."));
set_focus('ref');
return false;
}
}
if (!check_num('ChargeFreightCost', 0)) {
display_error(_("The entered shipping cost is invalid or less than zero."));
set_focus('ChargeFreightCost');
return false;
}
if (!check_quantities()) {
display_error(_("Selected quantity cannot be less than zero nor more than quantity not credited yet."));
return false;
}
return true;
}
示例7: handle_new_order
function handle_new_order()
{
if (isset($_SESSION['transfer_items'])) {
$_SESSION['transfer_items']->clear_items();
unset($_SESSION['transfer_items']);
}
$_SESSION['transfer_items'] = new items_cart(ST_LOCTRANSFER);
$_POST['AdjDate'] = new_doc_date();
if (!is_date_in_fiscalyear($_POST['AdjDate'])) {
$_POST['AdjDate'] = end_fiscalyear();
}
$_SESSION['transfer_items']->tran_date = $_POST['AdjDate'];
}
示例8: handle_new_order
function handle_new_order()
{
if (isset($_SESSION['transfer_items'])) {
$_SESSION['transfer_items']->clear_items();
unset($_SESSION['transfer_items']);
}
session_register("transfer_items");
$_SESSION['transfer_items'] = new items_cart();
$_POST['AdjDate'] = Today();
if (!is_date_in_fiscalyear($_POST['AdjDate'])) {
$_POST['AdjDate'] = end_fiscalyear();
}
$_SESSION['transfer_items']->tran_date = $_POST['AdjDate'];
}
示例9: check_data
function check_data()
{
if (!$_SESSION['supp_trans']->is_valid_trans_to_post()) {
display_error(tr("The invoice cannot be processed because the there are no items or values on the invoice. Invoices are expected to have a charge."));
return false;
}
if (!references::is_valid($_SESSION['supp_trans']->reference)) {
display_error(tr("You must enter an invoice reference."));
set_focus('reference');
return false;
}
if (!is_new_reference($_SESSION['supp_trans']->reference, 20)) {
display_error(tr("The entered reference is already in use."));
set_focus('reference');
return false;
}
if (!references::is_valid($_SESSION['supp_trans']->supp_reference)) {
display_error(tr("You must enter a supplier's invoice reference."));
set_focus('supp_reference');
return false;
}
if (!is_date($_SESSION['supp_trans']->tran_date)) {
display_error(tr("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(tr("The entered date is not in fiscal year."));
set_focus('trans_date');
return false;
}
if (!is_date($_SESSION['supp_trans']->due_date)) {
display_error(tr("The invoice as entered cannot be processed because the due date is in an incorrect format."));
set_focus('due_date');
return false;
}
$sql = "SELECT Count(*) FROM supp_trans WHERE supplier_id='" . $_SESSION['supp_trans']->supplier_id . "' AND supp_reference='" . $_POST['supp_reference'] . "'";
$result = db_query($sql, "The sql to check for the previous entry of the same invoice failed");
$myrow = db_fetch_row($result);
if ($myrow[0] == 1) {
/*Transaction reference already entered */
display_error(tr("This invoice number has already been entered. It cannot be entered again." . " (" . $_POST['supp_reference'] . ")"));
return false;
}
return true;
}
示例10: can_process
function can_process()
{
global $wo_details;
if (!references::is_valid($_POST['ref'])) {
display_error(tr("You must enter a reference."));
set_focus('ref');
return false;
}
if (!is_new_reference($_POST['ref'], 29)) {
display_error(tr("The entered reference is already in use."));
set_focus('ref');
return false;
}
if (!check_num('quantity', 0)) {
display_error(tr("The quantity entered is not a valid number or less then zero."));
set_focus('quantity');
return false;
}
if (!is_date($_POST['date_'])) {
display_error(tr("The entered date is invalid."));
set_focus('date_');
return false;
} elseif (!is_date_in_fiscalyear($_POST['date_'])) {
display_error(tr("The entered date is not in fiscal year."));
set_focus('date_');
return false;
}
if (date_diff(sql2date($wo_details["released_date"]), $_POST['date_'], "d") > 0) {
display_error(tr("The production date cannot be before the release date of the work order."));
set_focus('date_');
return false;
}
// if unassembling we need to check the qoh
if ($_POST['ProductionType'] == 0 && !sys_prefs::allow_negative_stock()) {
$wo_details = get_work_order($_POST['selected_id']);
$qoh = get_qoh_on_date($wo_details["stock_id"], $wo_details["loc_code"], $date_);
if (-$_POST['quantity'] + $qoh < 0) {
display_error(tr("The unassembling cannot be processed because there is insufficient stock."));
set_focus('quantity');
return false;
}
}
return true;
}
示例11: check_valid_entries
function check_valid_entries()
{
if (!is_date($_POST['date_'])) {
display_error(tr("The entered date is invalid."));
set_focus('date_');
return false;
}
if (!is_date_in_fiscalyear($_POST['date_'])) {
display_error(tr("The entered date is not in fiscal year."));
set_focus('date_');
return false;
}
if (!is_numeric($_POST['trans_no']) or $_POST['trans_no'] <= 0) {
display_error(tr("The transaction number is expected to be numeric and greater than zero."));
set_focus('trans_no');
return false;
}
return true;
}
示例12: check_data
function check_data()
{
global $total_grn_value, $total_gl_value;
if (!$_SESSION['supp_trans']->is_valid_trans_to_post()) {
display_error(tr("The credit note cannot be processed because the there are no items or values on the invoice. Credit notes are expected to have a charge."));
set_focus('');
return false;
}
if (!references::is_valid($_SESSION['supp_trans']->reference)) {
display_error(tr("You must enter an credit note reference."));
set_focus('reference');
return false;
}
if (!is_new_reference($_SESSION['supp_trans']->reference, 21)) {
display_error(tr("The entered reference is already in use."));
set_focus('reference');
return false;
}
if (!references::is_valid($_SESSION['supp_trans']->supp_reference)) {
display_error(tr("You must enter a supplier's credit note reference."));
set_focus('supp_reference');
return false;
}
if (!is_date($_SESSION['supp_trans']->tran_date)) {
display_error(tr("The credit note as entered cannot be processed because the date entered is not valid."));
set_focus('tran_date');
return false;
} elseif (!is_date_in_fiscalyear($_SESSION['supp_trans']->tran_date)) {
display_error(tr("The entered date is not in fiscal year."));
set_focus('tran_date');
return false;
}
if (!is_date($_SESSION['supp_trans']->due_date)) {
display_error(tr("The invoice as entered cannot be processed because the due date is in an incorrect format."));
set_focus('due_date');
return false;
}
if ($_SESSION['supp_trans']->ov_amount < $total_gl_value + $total_grn_value) {
display_error(tr("The credit note total as entered is less than the sum of the the general ledger entires (if any) and the charges for goods received. There must be a mistake somewhere, the credit note as entered will not be processed."));
return false;
}
return true;
}
示例13: can_process
function can_process()
{
global $Refs;
/*===================MOODLEARNING===========================*/
if (!get_post('custom_num')) {
display_error(_("You must enter a Credit Memo No."));
set_focus('custom_num');
return false;
}
if (!is_numeric($_POST['custom_num'])) {
display_error(_("The Credit Memo # contains invalid characters. Please check again."));
set_focus('custom_num');
return false;
}
/*==========================================================*/
if (!is_date($_POST['CreditDate'])) {
display_error(_("The entered date is invalid."));
set_focus('CreditDate');
return false;
} elseif (!is_date_in_fiscalyear($_POST['CreditDate'])) {
display_error(_("The entered date is not in fiscal year."));
set_focus('CreditDate');
return false;
}
if ($_SESSION['Items']->trans_no == 0) {
if (!$Refs->is_valid($_POST['ref'])) {
display_error(_("You must enter a reference."));
set_focus('ref');
return false;
}
}
if (!check_num('ChargeFreightCost', 0)) {
display_error(_("The entered shipping cost is invalid or less than zero."));
set_focus('ChargeFreightCost');
return false;
}
if (!check_quantities()) {
display_error(_("Selected quantity cannot be less than zero nor more than quantity not credited yet."));
return false;
}
return true;
}
示例14: can_process
function can_process()
{
global $Refs, $SysPrefs;
$adj =& $_SESSION['adj_items'];
if (count($adj->line_items) == 0) {
display_error(_("You must enter at least one non empty item line."));
set_focus('stock_id');
return false;
}
if (!$Refs->is_valid($_POST['ref'])) {
display_error(_("You must enter a reference."));
set_focus('ref');
return false;
}
if (!is_new_reference($_POST['ref'], ST_INVADJUST)) {
display_error(_("The entered reference is already in use."));
set_focus('ref');
return false;
}
if (!is_date($_POST['AdjDate'])) {
display_error(_("The entered date for the adjustment is invalid."));
set_focus('AdjDate');
return false;
} elseif (!is_date_in_fiscalyear($_POST['AdjDate'])) {
display_error(_("The entered date is not in fiscal year."));
set_focus('AdjDate');
return false;
} elseif (!$SysPrefs->allow_negative_stock()) {
$low_stock = $adj->check_qoh($_POST['StockLocation'], $_POST['AdjDate'], !$_POST['Increase']);
if ($low_stock) {
display_error(_("The adjustment cannot be processed because it would cause negative inventory balance for marked items as of document date or later."));
unset($_POST['Process']);
return false;
}
}
return true;
}
示例15: can_process
function can_process()
{
global $wo_details;
if (!check_num('costs', 0)) {
display_error(_("The amount entered is not a valid number or less then zero."));
set_focus('costs');
return false;
}
if (!is_date($_POST['date_'])) {
display_error(_("The entered date is invalid."));
set_focus('date_');
return false;
} elseif (!is_date_in_fiscalyear($_POST['date_'])) {
display_error(_("The entered date is not in fiscal year."));
set_focus('date_');
return false;
}
if (date_diff2(sql2date($wo_details["released_date"]), $_POST['date_'], "d") > 0) {
display_error(_("The additional cost date cannot be before the release date of the work order."));
set_focus('date_');
return false;
}
return true;
}