本文整理汇总了PHP中Order::getOrdersIdInvoiceByDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Order::getOrdersIdInvoiceByDate方法的具体用法?PHP Order::getOrdersIdInvoiceByDate怎么用?PHP Order::getOrdersIdInvoiceByDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Order
的用法示例。
在下文中一共展示了Order::getOrdersIdInvoiceByDate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postProcess
public function postProcess()
{
global $currentIndex;
if (Tools::isSubmit('submitPrint')) {
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 end date');
}
if (!sizeof($this->_errors)) {
$orders = Order::getOrdersIdInvoiceByDate(Tools::getValue('date_from'), Tools::getValue('date_to'), NULL, 'invoice');
if (sizeof($orders)) {
Tools::redirectAdmin('pdf.php?invoices&date_from=' . urlencode(Tools::getValue('date_from')) . '&date_to=' . urlencode(Tools::getValue('date_to')) . '&token=' . $this->token);
}
$this->_errors[] = $this->l('No invoice found for this period');
}
} elseif (Tools::isSubmit('submitOptionsinvoice')) {
if (intval(Tools::getValue('PS_INVOICE_NUMBER')) == 0) {
$this->_errors[] = $this->l('Invalid invoice number');
} else {
parent::postProcess();
}
} else {
parent::postProcess();
}
}
示例2: generateInvoicesPDF
function generateInvoicesPDF()
{
$orders = Order::getOrdersIdInvoiceByDate($_GET['date_from'], $_GET['date_to'], NULL, 'invoice');
if (!is_array($orders)) {
die(Tools::displayError('No invoices found'));
}
PDF::multipleInvoices($orders);
}
示例3: postProcess
public function postProcess()
{
global $currentIndex;
if (Tools::getValue('submitPrint')) {
if (!Validate::isDate($_POST['date_from'])) {
$this->_errors[] = $this->l('Invalid from date');
}
if (!Validate::isDate($_POST['date_to'])) {
$this->_errors[] = $this->l('Invalid end date');
}
if (!sizeof($this->_errors)) {
$orders = Order::getOrdersIdInvoiceByDate($_POST['date_from'], $_POST['date_to'], NULL, 'invoice');
if (sizeof($orders)) {
Tools::redirectAdmin('pdf.php?invoices&date_from=' . urlencode($_POST['date_from']) . '&date_to=' . urlencode($_POST['date_to']) . '&token=' . $this->token);
}
$this->_errors[] = $this->l('No invoice found for this period');
}
} else {
parent::postProcess();
}
}
示例4: die
if (!Validate::isLoadedObject($order)) {
die(Tools::displayError('cannot find order in database'));
}
PDF::invoice($order);
} elseif (isset($_GET['id_order_slip'])) {
$orderSlip = new OrderSlip(intval($_GET['id_order_slip']));
$order = new Order(intval($orderSlip->id_order));
if (!Validate::isLoadedObject($order)) {
die(Tools::displayError('cannot find order in database'));
}
$order->products = OrderSlip::getOrdersSlipProducts($orderSlip->id, $order);
$tmp = NULL;
PDF::invoice($order, 'D', false, $tmp, $orderSlip);
} elseif (isset($_GET['id_delivery'])) {
$order = Order::getByDelivery(intval($_GET['id_delivery']));
if (!Validate::isLoadedObject($order)) {
die(Tools::displayError('cannot find order in database'));
}
$tmp = NULL;
PDF::invoice($order, 'D', false, $tmp, false, $order->delivery_number);
} elseif (isset($_GET['invoices'])) {
$invoices = Order::getOrdersIdInvoiceByDate($_GET['date_from'], $_GET['date_to'], NULL, 'invoice');
if (is_array($invoices)) {
PDF::multipleInvoices($invoices);
}
} elseif (isset($_GET['deliveryslips'])) {
$slips = unserialize(urldecode($_GET['deliveryslips']));
if (is_array($slips)) {
PDF::multipleDelivery($slips);
}
}
示例5: postProcess
public function postProcess()
{
global $currentIndex;
if (Tools::isSubmit('submitPrint')) {
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 end date');
}
if (!sizeof($this->_errors)) {
$orders = Order::getOrdersIdInvoiceByDate(Tools::getValue('date_from'), Tools::getValue('date_to'), NULL, 'invoice');
if (sizeof($orders)) {
Tools::redirectAdmin('pdf.php?invoices&date_from=' . urlencode(Tools::getValue('date_from')) . '&date_to=' . urlencode(Tools::getValue('date_to')) . '&token=' . $this->token);
}
$this->_errors[] = $this->l('No invoice found for this period');
}
} elseif (Tools::isSubmit('submitPrint2')) {
if (!is_array($statusArray = Tools::getValue('id_order_state')) or !count($statusArray)) {
$this->_errors[] = $this->l('Invalid order statuses');
} else {
foreach ($statusArray as $id_order_state) {
if (count($orders = Order::getOrderIdsByStatus((int) $id_order_state))) {
Tools::redirectAdmin('pdf.php?invoices2&id_order_state=' . implode('-', $statusArray) . '&token=' . $this->token);
}
}
$this->_errors[] = $this->l('No invoice found for this status');
}
} elseif (Tools::isSubmit('submitOptionsinvoice')) {
if ((int) Tools::getValue('PS_INVOICE_START_NUMBER') != 0 and (int) Tools::getValue('PS_INVOICE_START_NUMBER') <= Order::getLastInvoiceNumber()) {
$this->_errors[] = $this->l('Invalid invoice number (must be > ') . Order::getLastInvoiceNumber() . ')';
} else {
parent::postProcess();
}
} else {
parent::postProcess();
}
}