$_POST['DateBanked'] = end_fiscalyear(); } } if (isset($_GET['AddedID'])) { $payment_no = $_GET['AddedID']; display_notification_centered(_("The customer payment has been successfully entered.")); submenu_print(_("&Print This Receipt"), ST_CUSTPAYMENT, $payment_no . "-" . ST_CUSTPAYMENT, 'prtopt'); display_note(get_gl_view_str(ST_CUSTPAYMENT, $payment_no, _("&View the GL Journal Entries for this Customer Payment"))); // hyperlink_params($path_to_root . "/sales/allocations/customer_allocate.php", _("&Allocate this Customer Payment"), "trans_no=$payment_no&trans_type=12"); hyperlink_no_params($path_to_root . "/sales/inquiry/customer_allocation_inquiry.php?customer_id=", _("Select Another &Customer Transaction for Payment")); hyperlink_no_params($path_to_root . "/sales/customer_payments.php", _("Enter Another &Customer Payment")); display_footer_exit(); } elseif (isset($_GET['UpdatedID'])) { $payment_no = $_GET['UpdatedID']; display_notification_centered(_("The customer payment has been successfully updated.")); submenu_print(_("&Print This Receipt"), ST_CUSTPAYMENT, $payment_no . "-" . ST_CUSTPAYMENT, 'prtopt'); display_note(get_gl_view_str(ST_CUSTPAYMENT, $payment_no, _("&View the GL Journal Entries for this Customer Payment"))); // hyperlink_params($path_to_root . "/sales/allocations/customer_allocate.php", _("&Allocate this Customer Payment"), "trans_no=$payment_no&trans_type=12"); hyperlink_no_params($path_to_root . "/sales/inquiry/customer_inquiry.php?", _("Select Another Customer Payment for &Edition")); hyperlink_no_params($path_to_root . "/sales/customer_payments.php", _("Enter Another &Customer Payment")); display_footer_exit(); } //---------------------------------------------------------------------------------------------- function can_process() { global $Refs; if (!get_post('customer_id')) { display_error(_("There is no customer selected.")); set_focus('customer_id'); return false; }
$_SESSION['alloc']->amount = $_SESSION['alloc']->allocs[$line]->current_allocated = $un_allocated; $_POST['amount'] = $_POST['amount' . $line] = price_format($un_allocated); break; } } unset($inv); } else { display_error(_("Invalid purchase invoice number.")); } } } if (isset($_GET['AddedID'])) { $payment_id = $_GET['AddedID']; display_notification_centered(_("Payment has been sucessfully entered")); submenu_print(_("&Print This Remittance"), ST_SUPPAYMENT, $payment_id . "-" . ST_SUPPAYMENT, 'prtopt'); submenu_print(_("&Email This Remittance"), ST_SUPPAYMENT, $payment_id . "-" . ST_SUPPAYMENT, null, 1); submenu_view(_("View this Payment"), ST_SUPPAYMENT, $payment_id); display_note(get_gl_view_str(ST_SUPPAYMENT, $payment_id, _("View the GL &Journal Entries for this Payment")), 0, 1); submenu_option(_("Enter another supplier &payment"), "/purchasing/supplier_payment.php?supplier_id=" . $_POST['supplier_id']); submenu_option(_("Enter Other &Payment"), "/gl/gl_bank.php?NewPayment=Yes"); submenu_option(_("Enter &Customer Payment"), "/sales/customer_payments.php"); submenu_option(_("Enter Other &Deposit"), "/gl/gl_bank.php?NewDeposit=Yes"); submenu_option(_("Bank Account &Transfer"), "/gl/bank_transfer.php"); display_footer_exit(); } //---------------------------------------------------------------------------------------- function check_inputs() { global $Refs; if (!get_post('supplier_id')) { display_error(_("There is no supplier selected."));
} else { submenu_option(_("Enter a &New Delivery"), "/sales/sales_order_entry.php?NewDelivery=0"); } display_footer_exit(); } elseif (isset($_GET['AddedDI'])) { $invoice = $_GET['AddedDI']; display_notification_centered(sprintf(_("Invoice # %d has been entered."), $invoice)); submenu_view(_("&View This Invoice"), ST_SALESINVOICE, $invoice); submenu_print(_("&Print Sales Invoice"), ST_SALESINVOICE, $invoice . "-" . ST_SALESINVOICE, 'prtopt'); submenu_print(_("&Email Sales Invoice"), ST_SALESINVOICE, $invoice . "-" . ST_SALESINVOICE, null, 1); set_focus('prtopt'); $sql = "SELECT trans_type_from, trans_no_from FROM " . TB_PREF . "cust_allocations\n\t\t\tWHERE trans_type_to=" . ST_SALESINVOICE . " AND trans_no_to=" . db_escape($invoice); $result = db_query($sql, "could not retrieve customer allocation"); $row = db_fetch($result); if ($row !== false) { submenu_print(_("Print &Receipt"), $row['trans_type_from'], $row['trans_no_from'] . "-" . $row['trans_type_from'], 'prtopt'); } display_note(get_gl_view_str(ST_SALESINVOICE, $invoice, _("View the GL &Journal Entries for this Invoice")), 0, 1); if (isset($_GET['Type']) && $_GET['Type'] == 1) { submenu_option(_("Enter a &New Template Invoice"), "/sales/inquiry/sales_orders_view.php?InvoiceTemplates=Yes"); } else { submenu_option(_("Enter a &New Direct Invoice"), "/sales/sales_order_entry.php?NewInvoice=0"); } if ($row === false) { submenu_option(_("Entry &customer payment for this invoice"), "/sales/customer_payments.php?SInvoice=" . $invoice); } submenu_option(_("Add an Attachment"), "/admin/attachments.php?filterType=" . ST_SALESINVOICE . "&trans_no={$invoice}"); display_footer_exit(); } else { check_edit_conflicts(); }
//--------------------------------------------------------------------------------------- if (isset($_GET['trans_no'])) { $selected_id = $_GET['trans_no']; } elseif (isset($_POST['selected_id'])) { $selected_id = $_POST['selected_id']; } //--------------------------------------------------------------------------------------- if (isset($_GET['AddedID'])) { $id = $_GET['AddedID']; $stype = ST_WORKORDER; display_notification_centered(_("The work order been added.")); display_note(get_trans_view_str($stype, $id, _("View this Work Order")), 0, 1); if ($_GET['type'] != WO_ADVANCED) { include_once $path_to_root . "/reporting/includes/reporting.inc"; submenu_print(_("&Print This Work Order"), ST_WORKORDER, $id, 'prtopt'); submenu_print(_("&Email This Work Order"), ST_WORKORDER, $id, null, 1); display_note(get_gl_view_str($stype, $id, _("View the GL Journal Entries for this Work Order")), 1); $ar = array('PARAM_0' => $_GET['date'], 'PARAM_1' => $_GET['date'], 'PARAM_2' => $stype, 'PARAM_3' => '', 'PARAM_4' => isset($def_print_orientation) && $def_print_orientation == 1 ? 1 : 0); display_note(print_link(_("Print the GL Journal Entries for this Work Order"), 702, $ar), 1); hyperlink_params("{$path_to_root}/admin/attachments.php", _("Add an Attachment"), "filterType={$stype}&trans_no={$id}"); } safe_exit(); } //--------------------------------------------------------------------------------------- if (isset($_GET['UpdatedID'])) { $id = $_GET['UpdatedID']; display_notification_centered(_("The work order been updated.")); safe_exit(); } //--------------------------------------------------------------------------------------- if (isset($_GET['DeletedID'])) {
} //-------------------------------------------------------------------------------------------------- function line_start_focus() { global $Ajax; $Ajax->activate('items_table'); $Ajax->activate('footer'); set_focus('_code_id_edit'); } //----------------------------------------------------------------------------------------------- if (isset($_GET['AddedID'])) { $trans_no = $_GET['AddedID']; $trans_type = ST_BANKPAYMENT; display_notification_centered(sprintf(_("Payment %d has been entered"), $trans_no)); display_note(get_gl_view_str($trans_type, $trans_no, _("&View the GL Postings for this Payment"))); submenu_print(_("&Print Check Voucher"), $trans_type, $trans_no, 'prtopt'); //moodlearning hyperlink_params($_SERVER['PHP_SELF'], _("Enter Another &Payment"), "NewPayment=yes"); hyperlink_params($_SERVER['PHP_SELF'], _("Enter A &Deposit"), "NewDeposit=yes"); hyperlink_params("{$path_to_root}/admin/attachments.php", _("Add an Attachment"), "filterType={$trans_type}&trans_no={$trans_no}"); display_footer_exit(); } if (isset($_GET['UpdatedID'])) { $trans_no = $_GET['UpdatedID']; $trans_type = ST_BANKPAYMENT; display_notification_centered(sprintf(_("Payment %d has been modified"), $trans_no)); display_note(get_gl_view_str($trans_type, $trans_no, _("&View the GL Postings for this Payment"))); hyperlink_params($_SERVER['PHP_SELF'], _("Enter Another &Payment"), "NewPayment=yes"); hyperlink_params($_SERVER['PHP_SELF'], _("Enter A &Deposit"), "NewDeposit=yes"); display_footer_exit(); }
page($_SESSION['page_title'], false, false, '', $js); //-------------------------------------------------------------------------------------------------- function line_start_focus() { global $Ajax; $Ajax->activate('items_table'); set_focus('_code_id_edit'); } //----------------------------------------------------------------------------------------------- if (isset($_GET['AddedID'])) { $trans_no = $_GET['AddedID']; $trans_type = ST_JOURNAL; $jv = $_POST['jv_no']; display_notification_centered(_("Journal entry has been entered") . " #{$trans_no}"); display_note(get_gl_view_str($trans_type, $trans_no, _("&View this Journal Entry"))); submenu_print(_("&Print Journal Voucher"), $trans_type, $trans_no, 'prtopt'); //moodlearning reset_focus(); hyperlink_params($_SERVER['PHP_SELF'], _("Enter &New Journal Entry"), "NewJournal=Yes"); hyperlink_params("{$path_to_root}/admin/attachments.php", _("Add an Attachment"), "filterType={$trans_type}&trans_no={$trans_no}"); display_footer_exit(); } elseif (isset($_GET['UpdatedID'])) { $trans_no = $_GET['UpdatedID']; $trans_type = ST_JOURNAL; display_notification_centered(_("Journal entry has been updated") . " #{$trans_no}"); display_note(get_gl_view_str($trans_type, $trans_no, _("&View this Journal Entry"))); hyperlink_no_params($path_to_root . "/gl/inquiry/journal_inquiry.php", _("Return to Journal &Inquiry")); display_footer_exit(); } //-------------------------------------------------------------------------------------------------- if (isset($_GET['NewJournal'])) {
$id = $_GET['id']; } $total = 0; start_form(); start_table(TABLESTYLE, "width=50%"); $result = fetchRoyaltyReport($id); $name = ""; while ($author = db_fetch($result)) { $name = $author[1]; } echo "<b>" . $name . "</b>"; br(); br(); $th = array(_('Book Title'), _('Percentage'), _('Total Sales'), _('')); table_header($th); $result = fetchRoyaltyReport($id); while ($myrow = db_fetch($result)) { start_row(); label_cell($myrow[2]); label_cell($myrow[3]); label_cell($myrow[5]); echo "<td>"; submenu_print(_("&Print This"), ST_ROYALTY, $myrow[6], null, 1); echo "</td>"; $total += $myrow[5]; end_row(); } end_table(); br(); end_form(); end_page();
$id = $_GET['id']; $type = $_GET['type']; $no = $_GET['no']; function checker($id, $type) { $sql = "SELECT b.debtor_no, b.name, DATE_FORMAT(NOW(), '%m/%d/%y'), b.address, a.alloc, a.ov_amount FROM " . TB_PREF . "debtors_master as b INNER JOIN " . TB_PREF . "debtor_trans as a ON b.debtor_no = a.debtor_no WHERE a.trans_no = " . db_escape($id) . " and a.type = " . db_escape($type) . " "; return db_query($sql, 'Error'); } function init($id, $type, $no) { $amount = NULL; $alloc = NULL; $result = checker($id, $type); while ($myrow = db_fetch($result)) { $amount = $myrow[5]; $alloc = $myrow[4]; } $sql = "INSERT INTO " . TB_PREF . "cust_alloc_details(details_id, no, alloc, total_amount, trans_date) VALUES(" . db_escape($id) . ", " . db_escape($no) . ", " . db_escape($alloc) . ", " . db_escape($amount) . ", NOW())"; return db_query($sql, 'Error'); } start_form(); if (init($id, $type, $no)) { start_table(TABLESTYLE2); br(); br(); display_notification(_('Allocation Successful')); submenu_print(_("&Print Collection Receipt"), ST_ALLOC, $_GET['id'] . '/' . $_GET['type'] . '/' . $_GET['no'] . '/collection', null, 1); end_table(1); } end_form(); end_page();