本文整理汇总了PHP中OrderInvoice::getByDeliveryDateInterval方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderInvoice::getByDeliveryDateInterval方法的具体用法?PHP OrderInvoice::getByDeliveryDateInterval怎么用?PHP OrderInvoice::getByDeliveryDateInterval使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderInvoice
的用法示例。
在下文中一共展示了OrderInvoice::getByDeliveryDateInterval方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postProcess
public function postProcess()
{
if (Tools::isSubmit('submitAdddelivery')) {
if (!Validate::isDate(Tools::getValue('date_from'))) {
$this->errors[] = Tools::displayError('Invalid \'from\' date');
}
if (!Validate::isDate(Tools::getValue('date_to'))) {
$this->errors[] = Tools::displayError('Invalid \'to\' date');
}
if (!count($this->errors)) {
if (count(OrderInvoice::getByDeliveryDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to')))) {
Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf') . '&submitAction=generateDeliverySlipsPDF&date_from=' . urlencode(Tools::getValue('date_from')) . '&date_to=' . urlencode(Tools::getValue('date_to')));
} else {
$this->errors[] = Tools::displayError('No delivery slip was found for this period.');
}
}
} else {
parent::postProcess();
}
}
示例2: processGenerateDeliverySlipsPDF
public function processGenerateDeliverySlipsPDF()
{
$order_invoice_collection = OrderInvoice::getByDeliveryDateInterval(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_DELIVERY_SLIP);
}
示例3: processGenerateDeliverySlipsPDF
public function processGenerateDeliverySlipsPDF()
{
$order_invoice_collection = OrderInvoice::getByDeliveryDateInterval(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_DELIVERY_SLIP);
}