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


PHP OrderInvoice::getByDateInterval方法代码示例

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


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

示例1: postProcess

 public function postProcess()
 {
     if (Tools::isSubmit('submitAddinvoice_date')) {
         if (!Validate::isDate(Tools::getValue('date_from'))) {
             $this->errors[] = $this->l('Invalid "From" date');
         }
         if (!Validate::isDate(Tools::getValue('date_to'))) {
             $this->errors[] = $this->l('Invalid "To" date');
         }
         if (!count($this->errors)) {
             if (count(OrderInvoice::getByDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to')))) {
                 Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf') . '&submitAction=generateInvoicesPDF&date_from=' . urlencode(Tools::getValue('date_from')) . '&date_to=' . urlencode(Tools::getValue('date_to')));
             }
             $this->errors[] = $this->l('No invoice has been found for this period.');
         }
     } elseif (Tools::isSubmit('submitAddinvoice_status')) {
         if (!is_array($status_array = Tools::getValue('id_order_state')) || !count($status_array)) {
             $this->errors[] = $this->l('You must select at least one order status.');
         } else {
             foreach ($status_array as $id_order_state) {
                 if (count(OrderInvoice::getByStatus((int) $id_order_state))) {
                     Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf') . '&submitAction=generateInvoicesPDF2&id_order_state=' . implode('-', $status_array));
                 }
             }
             $this->errors[] = $this->l('No invoice has been found for this status.');
         }
     } else {
         parent::postProcess();
     }
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:30,代码来源:AdminInvoicesController.php

示例2: processGenerateInvoicesPDF

 public function processGenerateInvoicesPDF()
 {
     $order_invoice_collection = OrderInvoice::getByDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to'));
     if (!count($order_invoice_collection)) {
         die(Tools::displayError('No invoice was found.'));
     }
     $this->generatePDF($order_invoice_collection, PDF::TEMPLATE_INVOICE);
 }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:8,代码来源:AdminPdfController.php

示例3: processGenerateInvoicesPDF

 public function processGenerateInvoicesPDF()
 {
     $order_invoice_collection = OrderInvoice::getByDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to'));
     if (!count($order_invoice_collection)) {
         die($this->trans('No invoice was found.', array(), 'Admin.OrdersCustomers.Notification'));
     }
     $this->generatePDF($order_invoice_collection, PDF::TEMPLATE_INVOICE);
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:8,代码来源:AdminPdfController.php


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