当前位置: 首页>>代码示例>>PHP>>正文


PHP orders::post_ordr方法代码示例

本文整理汇总了PHP中orders::post_ordr方法的典型用法代码示例。如果您正苦于以下问题:PHP orders::post_ordr方法的具体用法?PHP orders::post_ordr怎么用?PHP orders::post_ordr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在orders的用法示例。


在下文中一共展示了orders::post_ordr方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: constant

 // load journal main data
 $order->id = $_POST['id'] != '' ? $_POST['id'] : '';
 // will be null unless opening an existing purchase/receive
 $order->journal_id = JOURNAL_ID == 20 ? 7 : 13;
 // credit memo
 $order->gl_type = JOURNAL_ID == 20 ? 'por' : 'sos';
 $order->post_date = $post_date;
 $order->period = $period;
 $order->admin_id = $_SESSION['admin_id'];
 $order->purch_order_id = db_prepare_input($_POST['purch_order_id']);
 // customer PO/Ref number
 $order->description = constant('GENERAL_JOURNAL_' . $order->journal_id . '_DESC');
 $order->total_amount = $currencies->clean_value(db_prepare_input($_POST['total']), DEFAULT_CURRENCY);
 $order->gl_acct_id = JOURNAL_ID == 20 ? AP_DEFAULT_PURCHASE_ACCOUNT : AR_DEFAULT_GL_ACCT;
 $order->item_rows[0] = array('pstd' => '1', 'id' => '', 'desc' => db_prepare_input($_POST['desc_1']), 'total' => $currencies->clean_value(db_prepare_input($_POST['total_1'])), 'acct' => db_prepare_input($_POST['acct_1']));
 $post_credit = $order->post_ordr($action);
 if (!$post_credit) {
     $order = new objectInfo($_POST);
     $order->post_date = gen_db_date_short($_POST['post_date']);
     // fix the date to original format
     $order->id = $_POST['id'] != '' ? $_POST['id'] : '';
     // will be null unless opening an existing purchase/receive
     $messageStack->add(GL_ERROR_NO_POST, 'error');
 }
 gen_add_audit_log(AUDIT_LOG_DESC, $order->purchase_invoice_id, $order->total_amount);
 if (DEBUG) {
     $messageStack->write_debug();
 }
 if ($action == 'save') {
     gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
 }
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:31,代码来源:pre_process.php

示例2: sprintf

 // load journal main data
 $order->id = $_POST['id'] != '' ? $_POST['id'] : '';
 // will be null unless opening an existing purchase/receive
 $order->journal_id = JOURNAL_ID == 18 ? 13 : 7;
 // credit memo
 $order->gl_type = JOURNAL_ID == 18 ? 'sos' : 'por';
 $order->post_date = $post_date;
 $order->period = $period;
 $order->admin_id = $_SESSION['admin_id'];
 $order->purch_order_id = db_prepare_input($_POST['purch_order_id']);
 // customer PO/Ref number
 $order->description = sprintf(TEXT_JID_ENTRY, constant('ORD_TEXT_' . $order->journal_id . '_WINDOW_TITLE'));
 $order->total_amount = $currencies->clean_value(db_prepare_input($_POST['total']), DEFAULT_CURRENCY);
 $order->gl_acct_id = JOURNAL_ID == 18 ? AR_DEFAULT_GL_ACCT : AP_DEFAULT_PURCHASE_ACCOUNT;
 $order->item_rows[0] = array('pstd' => '1', 'id' => '', 'desc' => db_prepare_input($_POST['desc_1']), 'total' => $currencies->clean_value(db_prepare_input($_POST['total_1'])), 'acct' => db_prepare_input($_POST['acct_1']));
 $post_credit = $order->post_ordr($_REQUEST['action']);
 $messageStack->add("order id is now: {$order->id}", 'caution');
 $oID = $order->id;
 // need to fetch id for printing
 if (!$post_credit) {
     $order = new objectInfo($_POST);
     $order->post_date = gen_db_date($_POST['post_date']);
     // fix the date to original format
     $order->id = $_POST['id'] != '' ? $_POST['id'] : '';
     // will be null unless opening an existing purchase/receive
     $messageStack->add(GL_ERROR_NO_POST, 'error');
 }
 gen_add_audit_log(AUDIT_LOG_DESC, $order->purchase_invoice_id, $order->total_amount);
 if (DEBUG) {
     $messageStack->write_debug();
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php

示例3: elseif

         if ($order->ship_telephone1 === false) {
             $error = $messageStack->add(GEN_ERRMSG_NO_DATA . ORD_SHIP_TO . ' / ' . GEN_TELEPHONE1, 'error');
         }
         if ($order->ship_email === false) {
             $error = $messageStack->add(GEN_ERRMSG_NO_DATA . ORD_SHIP_TO . ' / ' . GEN_EMAIL, 'error');
         }
     }
 }
 // Item row errors
 if (!$order->item_rows) {
     $error = $messageStack->add(GL_ERROR_NO_ITEMS, 'error');
 }
 // End of error checking, process the order
 if (!$error) {
     // Post the order
     if ($post_success = $order->post_ordr($action)) {
         // Post the order class to the db
         gen_add_audit_log(constant('ORD_TEXT_' . JOURNAL_ID . '_WINDOW_TITLE') . ' - ' . ($_POST['id'] ? TEXT_EDIT : TEXT_ADD), $order->purchase_invoice_id, $order->total_amount);
         if (DEBUG) {
             $messageStack->write_debug();
         }
         if ($action == 'save') {
             gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
         } elseif ($action == 'payment') {
             switch (JOURNAL_ID) {
                 case 6:
                     $jID = 20;
                     break;
                     // payments
                 // payments
                 case 12:
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:31,代码来源:pre_process.php

示例4: saveUploadZip

     }
     if ($order->ship_telephone1 === false) {
         $error = $messageStack->add(GEN_ERRMSG_NO_DATA . ORD_SHIP_TO . ' / ' . GEN_TELEPHONE1, 'error');
     }
     if ($order->ship_email === false) {
         $error = $messageStack->add(GEN_ERRMSG_NO_DATA . ORD_SHIP_TO . ' / ' . GEN_EMAIL, 'error');
     }
 }
 // Item row errors
 if (!$order->item_rows) {
     $error = $messageStack->add(GL_ERROR_NO_ITEMS, 'error');
 }
 // End of error checking, check for attachments and process the order
 if (!$error) {
     // Post the order
     if ($post_success = $order->post_ordr($_REQUEST['action'])) {
         // Post the order class to the db
         if ($order->rm_attach) {
             @unlink(PHREEBOOKS_DIR_MY_ORDERS . 'order_' . $order->id . '.zip');
         }
         if (is_uploaded_file($_FILES['file_name']['tmp_name'])) {
             saveUploadZip('file_name', PHREEBOOKS_DIR_MY_ORDERS, 'order_' . $order->id . '.zip');
         }
         gen_add_audit_log(constant('ORD_TEXT_' . JOURNAL_ID . '_WINDOW_TITLE') . ' - ' . ($_POST['id'] ? TEXT_EDIT : TEXT_ADD), $order->purchase_invoice_id, $order->total_amount);
         if (DEBUG) {
             $messageStack->write_debug();
         }
         if ($_REQUEST['action'] == 'save') {
             gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
         } elseif ($_REQUEST['action'] == 'payment') {
             switch (JOURNAL_ID) {
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


注:本文中的orders::post_ordr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。