本文整理汇总了PHP中date_row函数的典型用法代码示例。如果您正苦于以下问题:PHP date_row函数的具体用法?PHP date_row怎么用?PHP date_row使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了date_row函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gl_payment_controls
function gl_payment_controls()
{
global $table_style2;
$home_currency = get_company_currency();
start_form(false, true);
start_table($table_style2, 5, 7);
echo "<tr><td valign=top>";
// outer table
echo "<table>";
bank_accounts_list_row(tr("From Account:"), 'FromBankAccount', null, true);
bank_accounts_list_row(tr("To Account:"), 'ToBankAccount', null, true);
date_row(tr("Transfer Date:"), 'DatePaid');
$from_currency = get_bank_account_currency($_POST['FromBankAccount']);
$to_currency = get_bank_account_currency($_POST['ToBankAccount']);
if ($from_currency != "" && $to_currency != "" && $from_currency != $to_currency) {
amount_row(tr("Amount:"), 'amount', null, null, $from_currency);
exchange_rate_display($from_currency, $to_currency, $_POST['DatePaid']);
} else {
amount_row(tr("Amount:"), 'amount');
}
echo "</table>";
echo "</td><td valign=top class='tableseparator'>";
// outer table
echo "<table>";
bank_trans_types_list_row(tr("Transfer Type:"), 'TransferType', null);
ref_row(tr("Reference:"), 'ref', references::get_next(systypes::bank_transfer()));
textarea_row(tr("Memo:"), 'memo_', null, 40, 4);
end_table(1);
echo "</td></tr>";
end_table(1);
// outer table
submit_center('AddPayment', tr("Enter Transfer"));
end_form();
}
示例2: display_reval
function display_reval()
{
global $Refs;
start_form();
start_table(TABLESTYLE2);
if (!isset($_POST['date'])) {
$_POST['date'] = Today();
}
date_row(_("Date for Revaluation:"), 'date', '', null, 0, 0, 0, null, true);
ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_JOURNAL));
textarea_row(_("Memo:"), 'memo_', null, 40, 4);
end_table(1);
submit_center('submit', _("Revaluate Currencies"), true, false);
end_form();
}
示例3: display_controls
function display_controls()
{
global $table_style2;
start_form(false, true);
if (!isset($_POST['supplier_id'])) {
$_POST['supplier_id'] = get_global_supplier(false);
}
if (!isset($_POST['DatePaid'])) {
$_POST['DatePaid'] = Today();
if (!is_date_in_fiscalyear($_POST['DatePaid'])) {
$_POST['DatePaid'] = end_fiscalyear();
}
}
start_table($table_style2, 5, 7);
echo "<tr><td valign=top>";
// outer table
echo "<table>";
bank_accounts_list_row(tr("From Bank Account:"), 'bank_account', null, true);
amount_row(tr("Amount of Payment:"), 'amount');
amount_row(tr("Amount of Discount:"), 'discount');
date_row(tr("Date Paid") . ":", 'DatePaid');
echo "</table>";
echo "</td><td valign=top class='tableseparator'>";
// outer table
echo "<table>";
supplier_list_row(tr("Payment To:"), 'supplier_id', null, false, true);
set_global_supplier($_POST['supplier_id']);
$supplier_currency = get_supplier_currency($_POST['supplier_id']);
$bank_currency = get_bank_account_currency($_POST['bank_account']);
if ($bank_currency != $supplier_currency) {
exchange_rate_display($bank_currency, $supplier_currency, $_POST['DatePaid']);
}
bank_trans_types_list_row(tr("Payment Type:"), 'PaymentType', null);
ref_row(tr("Reference:"), 'ref', references::get_next(22));
text_row(tr("Memo:"), 'memo_', null, 52, 50);
echo "</table>";
echo "</td></tr>";
end_table(1);
// outer table
submit_center('ProcessSuppPayment', tr("Enter Payment"));
if ($bank_currency != $supplier_currency) {
display_note(tr("The amount and discount are in the bank account's currency."), 2, 0);
}
end_form();
}
示例4: voiding_controls
function voiding_controls()
{
global $table_style2;
start_form(false, true);
start_table($table_style2);
systypes_list_row(tr("Transaction Type:"), "filterType", null, true);
text_row(tr("Transaction #:"), 'trans_no', null, 12, 12);
date_row(tr("Voiding Date:"), 'date_');
textarea_row(tr("Memo:"), 'memo_', null, 30, 4);
end_table(1);
if (!isset($_POST['ProcessVoiding'])) {
submit_center('ProcessVoiding', tr("Void Transaction"));
} else {
display_note(tr("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1);
submit_center_first('ConfirmVoiding', tr("Proceed"));
submit_center_last('CancelVoiding', tr("Cancel"));
}
end_form();
}
示例5: gl_payment_controls
function gl_payment_controls()
{
global $Refs;
$home_currency = get_company_currency();
start_form();
start_outer_table(TABLESTYLE2);
table_section(1);
bank_accounts_list_row(_("From Account:"), 'FromBankAccount', null, true);
bank_balance_row($_POST['FromBankAccount']);
bank_accounts_list_row(_("To Account:"), 'ToBankAccount', null, true);
if (!isset($_POST['DatePaid'])) {
// init page
$_POST['DatePaid'] = new_doc_date();
if (!is_date_in_fiscalyear($_POST['DatePaid'])) {
$_POST['DatePaid'] = end_fiscalyear();
}
}
date_row(_("Transfer Date:"), 'DatePaid', '', true, 0, 0, 0, null, true);
ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_BANKTRANSFER));
table_section(2);
$from_currency = get_bank_account_currency($_POST['FromBankAccount']);
$to_currency = get_bank_account_currency($_POST['ToBankAccount']);
if ($from_currency != "" && $to_currency != "" && $from_currency != $to_currency) {
amount_row(_("Amount:"), 'amount', null, null, $from_currency);
amount_row(_("Bank Charge:"), 'charge', null, null, $from_currency);
amount_row(_("Incoming Amount:"), 'target_amount', null, '', $to_currency, 2);
} else {
amount_row(_("Amount:"), 'amount');
amount_row(_("Bank Charge:"), 'charge');
}
textarea_row(_("Memo:"), 'memo_', null, 40, 4);
end_outer_table(1);
// outer table
submit_center('AddPayment', _("Enter Transfer"), true, '', 'default');
end_form();
}
示例6: voiding_controls
function voiding_controls()
{
global $selected_id;
$not_implemented = array(ST_PURCHORDER, ST_SALESORDER, ST_SALESQUOTE, ST_COSTUPDATE);
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
systypes_list_cells(_("Type:"), 'filterType', null, true, $not_implemented);
if (list_updated('filterType')) {
$selected_id = -1;
}
if (!isset($_POST['FromTransNo'])) {
$_POST['FromTransNo'] = "1";
}
if (!isset($_POST['ToTransNo'])) {
$_POST['ToTransNo'] = "999999";
}
ref_cells(_("from #:"), 'FromTransNo');
ref_cells(_("to #:"), 'ToTransNo');
submit_cells('ProcessSearch', _("Search"), '', '', 'default');
end_row();
end_table(1);
$trans_ref = false;
$sql = get_sql_for_view_transactions($_POST['filterType'], $_POST['FromTransNo'], $_POST['ToTransNo'], $trans_ref);
if ($sql == "") {
return;
}
$cols = array(_("#") => array('insert' => true, 'fun' => 'view_link'), _("Reference") => array('fun' => 'ref_view'), _("Date") => array('type' => 'date', 'fun' => 'date_view'), _("GL") => array('insert' => true, 'fun' => 'gl_view'), _("Select") => array('insert' => true, 'fun' => 'select_link'));
$table =& new_db_pager('transactions', $sql, $cols);
$table->width = "40%";
display_db_pager($table);
start_table(TABLESTYLE2);
if ($selected_id != -1) {
hidden('trans_no', $selected_id);
hidden('selected_id', $selected_id);
} else {
hidden('trans_no', '');
$_POST['memo_'] = '';
}
label_row(_("Transaction #:"), $selected_id == -1 ? '' : $selected_id);
date_row(_("Voiding Date:"), 'date_');
textarea_row(_("Memo:"), 'memo_', null, 30, 4);
end_table(1);
if (!isset($_POST['ProcessVoiding'])) {
submit_center('ProcessVoiding', _("Void Transaction"), true, '', 'default');
} else {
if (!exist_transaction($_POST['filterType'], $_POST['trans_no'])) {
display_error(_("The entered transaction does not exist or cannot be voided."));
unset($_POST['trans_no']);
unset($_POST['memo_']);
unset($_POST['date_']);
submit_center('ProcessVoiding', _("Void Transaction"), true, '', 'default');
} else {
display_warning(_("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1);
br();
submit_center_first('ConfirmVoiding', _("Proceed"), '', true);
submit_center_last('CancelVoiding', _("Cancel"), '', 'cancel');
}
}
end_form();
}
示例7: date_row
date_row(_("Date of Deposit:"), 'DateBanked', '', true, 0, 0, 0, null, true);
ref_row(_("PR #/Reference:"), 'ref', '', null, '', ST_CUSTPAYMENT);
table_section(3);
$comp_currency = get_company_currency();
$cust_currency = $_SESSION['alloc']->set_person($_POST['customer_id'], PT_CUSTOMER);
if (!$cust_currency) {
$cust_currency = $comp_currency;
}
$_SESSION['alloc']->currency = $bank_currency = get_bank_account_currency($_POST['bank_account']);
if ($cust_currency != $bank_currency) {
amount_row(_("Payment Amount:"), 'bank_amount', null, '', $bank_currency);
}
amount_row(_("Bank Charge:"), 'charge', null, '', $bank_currency);
text_row(_("OR #:"), 'or_num', null, '');
//moodlearning
date_row(_("Date of OR:"), 'or_date', '', true, 0, 0, 0, null, true);
//moodlearning
end_outer_table(1);
div_start('alloc_tbl');
show_allocatable(false);
div_end();
start_table(TABLESTYLE, "width=60%");
label_row(_("Customer prompt payment discount :"), $display_discount_percent);
amount_row(_("Amount of Discount:"), 'discount', null, '', $cust_currency);
amount_row(_("Amount:"), 'amount', null, '', $cust_currency);
textarea_row(_("Memo:"), 'memo_', null, 22, 4);
end_table(1);
if ($new) {
submit_center('AddPaymentItem', _("Add Payment"), true, '', 'default');
} else {
submit_center('AddPaymentItem', _("Update Payment"), true, '', 'default');
示例8: display_fiscalyear_edit
function display_fiscalyear_edit($selected_id)
{
global $Mode;
start_form();
start_table(TABLESTYLE2);
$company_year = get_company_pref('f_year');
$result = get_all_fiscalyears();
$row_cnt = db_num_rows($result);
if ($selected_id != -1) {
if ($Mode == 'Edit') {
$myrow = get_fiscalyear($selected_id);
$_POST['from_date'] = sql2date($myrow["begin"]);
$_POST['to_date'] = sql2date($myrow["end"]);
$_POST['closed'] = $myrow["closed"];
}
if ($row_cnt == 1) {
date_row(_("Fiscal Year Begin:"), 'from_date', '', null, 0, 0, 1001);
} else {
hidden('from_date');
label_row(_("Fiscal Year Begin:"), $_POST['from_date']);
}
hidden('to_date');
label_row(_("Fiscal Year End:"), $_POST['to_date']);
if ($myrow["id"] != $company_year) {
yesno_list_row(_("Is Closed:"), 'closed', null, "", "", false);
} else {
hidden('closed');
label_row(_("Is Closed:"), yesno_value($_POST['closed']));
}
} else {
$begin = next_begin_date();
if ($begin && $Mode != 'ADD_ITEM') {
$_POST['from_date'] = $begin;
$_POST['to_date'] = end_month(add_months($begin, 11));
$_POST['closed'] = 0;
}
hidden('from_date');
hidden('to_date');
hidden('closed');
}
hidden('selected_id', $selected_id);
end_table(1);
submit_add_or_update_center($selected_id == -1, '', 'both');
end_form();
}
示例9: set_focus
set_focus('stock_id');
return false;
}
return true;
}
//------------------------------------------------------------------------------------
if (isset($_POST['release'])) {
release_work_order($selected_id, $_POST['released_date'], $_POST['memo_']);
display_note(tr("The work order has been released to manufacturing."));
hyperlink_no_params("search_work_orders.php", tr("Select another work order"));
end_page();
exit;
}
//------------------------------------------------------------------------------------
start_form();
$myrow = get_work_order($selected_id);
$_POST['released'] = $myrow["released"];
$_POST['memo_'] = "";
if (can_process($myrow)) {
start_table($table_style2);
label_row(tr("Work Order #:"), $selected_id);
label_row(tr("Work Order Reference:"), $myrow["wo_ref"]);
date_row(tr("Released Date") . ":", 'released_date');
textarea_row(tr("Memo:"), 'memo_', $_POST['memo_'], 40, 5);
end_table(1);
submit_center('release', tr("Release Work Order"));
hidden('selected_id', $selected_id);
hidden('stock_id', $myrow['stock_id']);
}
end_form();
end_page();
示例10: hidden
} else {
hidden('selected_id', get_post('selected_id'));
}
//$_POST['leave_days'] = $_POST['monthly_loan'] = 0;
div_start('details');
if (isset($selected_id) && $selected_id != '') {
$_POST['empl_id'] = $_POST['selected_id'];
$myrow = get_employee($_POST['empl_id']);
$_POST['empl_id'] = $myrow["empl_id"];
$_POST['empl_name'] = $myrow["empl_name"];
$gross = $_POST['gross_salary'] = $myrow["gross_salary"];
start_table(TABLESTYLE2, "width=30%");
table_section_title(_("Employee Informations"));
hidden('empl_id', $_POST['empl_id']);
label_row(_("Employee Name:"), $_POST['empl_id'] . '-' . $_POST['empl_name']);
date_row(_("Date of Pay") . ":", 'date_of_pay');
label_row(_("Gross Pay:"), $_POST['gross_salary']);
hidden('gross_pay', $_POST['gross_salary']);
text_row(_("Number of Leave days :"), 'leave_days', null, 2, 40);
text_row(_("Monthly loan Amount:"), 'monthly_loan', null, 2, 40);
//submit_cells('RefreshInquiry', _("Show"),'',_('Show Results'), 'default');
end_table();
br();
submit_center('RefreshInquiry', _("Calculate Pay"), true, '', 'default');
br();
br();
}
div_end();
if (isset($selected_id) && $selected_id != '') {
div_start('totals_tbl');
$gross = $_POST['gross_salary'];
示例11: display_fiscalyear_edit
function display_fiscalyear_edit($selected_id)
{
global $table_style2;
start_form();
start_table($table_style2);
if ($selected_id) {
$myrow = get_fiscalyear($selected_id);
$_POST['from_date'] = sql2date($myrow["begin"]);
$_POST['to_date'] = sql2date($myrow["end"]);
$_POST['closed'] = $myrow["closed"];
hidden('selected_id', $selected_id);
hidden('from_date', $_POST['from_date']);
hidden('to_date', $_POST['to_date']);
label_row(tr("Fiscal Year Begin:"), $_POST['from_date']);
label_row(tr("Fiscal Year End:"), $_POST['to_date']);
} else {
date_row(tr("Fiscal Year Begin:"), 'from_date', null, 0, 0, 1001);
date_row(tr("Fiscal Year End:"), 'to_date', null, 0, 0, 1001);
}
yesno_list_row(tr("Is Closed:"), 'closed', null, "", "", false);
end_table(1);
submit_add_or_update_center(!isset($selected_id));
end_form();
}
示例12: supplier_list_row
supplier_list_row(_("Payment To:"), 'supplier_id', null, false, true);
if (list_updated('supplier_id') || list_updated('bank_account')) {
$_SESSION['alloc']->read();
$_POST['memo_'] = $_POST['amount'] = '';
$Ajax->activate('alloc_tbl');
}
set_global_supplier($_POST['supplier_id']);
if (!list_updated('bank_account') && !get_post('__ex_rate_changed')) {
$_POST['bank_account'] = get_default_supplier_bank_account($_POST['supplier_id']);
} else {
$_POST['amount'] = price_format(0);
}
bank_accounts_list_row(_("From Bank Account:"), 'bank_account', null, true);
bank_balance_row($_POST['bank_account']);
table_section(2);
date_row(_("Date Paid") . ":", 'DatePaid', '', true, 0, 0, 0, null, true);
ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_SUPPAYMENT));
table_section(3);
$comp_currency = get_company_currency();
$supplier_currency = $_SESSION['alloc']->set_person($_POST['supplier_id'], PT_SUPPLIER);
if (!$supplier_currency) {
$supplier_currency = $comp_currency;
}
$_SESSION['alloc']->currency = $bank_currency = get_bank_account_currency($_POST['bank_account']);
if ($bank_currency != $supplier_currency) {
amount_row(_("Bank Amount:"), 'bank_amount', null, '', $bank_currency);
}
amount_row(_("Bank Charge:"), 'charge', null, '', $bank_currency);
end_outer_table(1);
div_start('alloc_tbl');
show_allocatable(false);
示例13: read_customer_data
read_customer_data();
set_global_customer($_POST['customer_id']);
if (isset($_POST['HoldAccount']) && $_POST['HoldAccount'] != 0) {
display_warning(_("This customer account is on hold."));
}
$display_discount_percent = percent_format($_POST['pymt_discount'] * 100) . "%";
table_section(2);
if (!list_updated('bank_account')) {
$_POST['bank_account'] = get_default_customer_bank_account($_POST['customer_id']);
}
//Chaitanya : 13-OCT-2011 - Is AJAX call really needed ???
//bank_accounts_list_row(_("Into Bank Account:"), 'bank_account', null, true);
bank_accounts_list_row(_("Into Bank Account:"), 'bank_account', null, false);
text_row(_("Reference:"), 'ref', null, 20, 40);
table_section(3);
date_row(_("Date of Deposit:"), 'DateBanked', '', true, 0, 0, 0, null, true);
$comp_currency = get_company_currency();
$cust_currency = get_customer_currency($_POST['customer_id']);
$bank_currency = get_bank_account_currency($_POST['bank_account']);
if ($cust_currency != $bank_currency) {
exchange_rate_display($bank_currency, $cust_currency, $_POST['DateBanked'], $bank_currency == $comp_currency);
}
amount_row(_("Bank Charge:"), 'charge');
end_outer_table(1);
if ($cust_currency == $bank_currency) {
div_start('alloc_tbl');
show_allocatable(false);
div_end();
}
start_table(TABLESTYLE, "width=60%");
label_row(_("Customer prompt payment discount :"), $display_discount_percent);
示例14: display_item_form
function display_item_form()
{
global $table_style2;
start_table($table_style2, 5, 7);
echo "<tr><td valign=top>";
// outer table
echo "<table>";
if (!isset($_POST['customer_id'])) {
$_POST['customer_id'] = get_global_customer(false);
}
if (!isset($_POST['DateBanked'])) {
$_POST['DateBanked'] = Today();
if (!is_date_in_fiscalyear($_POST['DateBanked'])) {
$_POST['DateBanked'] = end_fiscalyear();
}
}
customer_list_row(tr("From Customer:"), 'customer_id', null, false, true);
if (db_customer_has_branches($_POST['customer_id'])) {
customer_branches_list_row(tr("Branch:"), $_POST['customer_id'], 'BranchID', null, false, true, true);
} else {
hidden('BranchID', reserved_words::get_any_numeric());
}
read_customer_data();
set_global_customer($_POST['customer_id']);
if (isset($_POST['HoldAccount']) && $_POST['HoldAccount'] != 0) {
echo "</table></table>";
display_note(tr("This customer account is on hold."), 0, 0, "class='redfb'");
} else {
$display_discount_percent = percent_format($_POST['pymt_discount'] * 100) . "%";
amount_row(tr("Amount:"), 'amount');
amount_row(tr("Amount of Discount:"), 'discount');
label_row(tr("Customer prompt payment discount :"), $display_discount_percent);
date_row(tr("Date of Deposit:"), 'DateBanked');
echo "</table>";
echo "</td><td valign=top class='tableseparator'>";
// outer table
echo "<table>";
bank_accounts_list_row(tr("Into Bank Account:"), 'bank_account', null, true);
$cust_currency = get_customer_currency($_POST['customer_id']);
$bank_currency = get_bank_account_currency($_POST['bank_account']);
if ($cust_currency != $bank_currency) {
exchange_rate_display($cust_currency, $bank_currency, $_POST['DateBanked']);
}
bank_trans_types_list_row(tr("Type:"), 'ReceiptType', null);
text_row(tr("Reference:"), 'ref', null, 20, 40);
textarea_row(tr("Memo:"), 'memo_', null, 22, 4);
echo "</table>";
echo "</td></tr>";
end_table();
// outer table
if ($cust_currency != $bank_currency) {
display_note(tr("Amount and discount are in customer's currency."));
}
echo "<br>";
submit_center('AddPaymentItem', tr("Add Payment"));
}
echo "<br>";
}
示例15: qty_format
}
if (!isset($_POST['quantity'])) {
$_POST['quantity'] = qty_format(1, $_POST['stock_id'], $dec);
} else {
$_POST['quantity'] = qty_format($_POST['quantity'], $_POST['stock_id'], $dec);
}
if (get_post('type') == WO_ADVANCED) {
qty_row(_("Quantity Required:"), 'quantity', null, null, null, $dec);
if ($_POST['released']) {
label_row(_("Quantity Manufactured:"), number_format($_POST['units_issued'], get_qty_dec($_POST['stock_id'])));
}
date_row(_("Date") . ":", 'date_', '', true);
date_row(_("Date Required By") . ":", 'RequDate', '', null, $SysPrefs->default_wo_required_by());
} else {
qty_row(_("Quantity:"), 'quantity', null, null, null, $dec);
date_row(_("Date") . ":", 'date_', '', true);
hidden('RequDate', '');
$sql = "SELECT DISTINCT account_code FROM " . TB_PREF . "bank_accounts";
$rs = db_query($sql, "could not get bank accounts");
$r = db_fetch_row($rs);
if (!isset($_POST['Labour'])) {
$_POST['Labour'] = price_format(0);
$_POST['cr_lab_acc'] = $r[0];
}
amount_row($wo_cost_types[WO_LABOUR], 'Labour');
gl_all_accounts_list_row(_("Credit Labour Account"), 'cr_lab_acc', null);
if (!isset($_POST['Costs'])) {
$_POST['Costs'] = price_format(0);
$_POST['cr_acc'] = $r[0];
}
amount_row($wo_cost_types[WO_OVERHEAD], 'Costs');