diff --git a/admin/themes/default/template/controllers/orders/_documents.tpl b/admin/themes/default/template/controllers/orders/_documents.tpl
index 8b1436d34..022df0499 100644
--- a/admin/themes/default/template/controllers/orders/_documents.tpl
+++ b/admin/themes/default/template/controllers/orders/_documents.tpl
@@ -43,97 +43,70 @@
{foreach from=$order->getDocuments() item=document}
-
{if get_class($document) eq 'OrderInvoice'}
- {if isset($document->is_delivery)}
-
- {else}
- {/if}
{elseif get_class($document) eq 'OrderSlip'}
{/if}
-
- | {dateFormat date=$document->date_add} |
-
- {if get_class($document) eq 'OrderInvoice'}
- {if isset($document->is_delivery)}
- {l s='Delivery slip'}
- {else}
- {l s='Invoice'}
- {/if}
- {elseif get_class($document) eq 'OrderSlip'}
- {l s='Credit Slip'}
- {/if}
- |
-
- {if get_class($document) eq 'OrderInvoice'}
- {if isset($document->is_delivery)}
-
- {else}
-
- {/if}
- {elseif get_class($document) eq 'OrderSlip'}
-
- {/if}
- {if get_class($document) eq 'OrderInvoice'}
- {if isset($document->is_delivery)}
- {Configuration::get('PS_DELIVERY_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$document->delivery_number}
- {else}
- {$document->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}
- {/if}
- {elseif get_class($document) eq 'OrderSlip'}
- {Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
- {/if}
-
- |
-
+ | {dateFormat date=$document->date_add} |
+
{if get_class($document) eq 'OrderInvoice'}
- {if isset($document->is_delivery)}
- --
- {else}
- {displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
- {if $document->getTotalPaid()}
-
- {if $document->getRestPaid() > 0}
- ({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
- {elseif $document->getRestPaid() < 0}
- ({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
- {/if}
-
- {/if}
- {/if}
+ {l s='Invoice'}
{elseif get_class($document) eq 'OrderSlip'}
- {displayPrice price=$document->total_products_tax_incl+$document->total_shipping_tax_incl currency=$currency->id}
+ {l s='Credit Slip'}
{/if}
- |
-
+ |
+
{if get_class($document) eq 'OrderInvoice'}
- {if !isset($document->is_delivery)}
-
- {if $document->getRestPaid()}
-
-
- {l s='Enter payment'}
-
- {/if}
-
-
- {if $document->note eq ''}
-
- {l s='Add note'}
- {else}
-
- {l s='Edit note'}
- {/if}
-
-
- {/if}
+
+ {elseif get_class($document) eq 'OrderSlip'}
+
{/if}
- |
-
+ {if get_class($document) eq 'OrderInvoice'}
+ {$document->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}
+ {elseif get_class($document) eq 'OrderSlip'}
+ {Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
+ {/if}
+
+
+
+ {if get_class($document) eq 'OrderInvoice'}
+ {displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
+ {if $document->getTotalPaid()}
+
+ {if $document->getRestPaid() > 0}
+ ({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
+ {elseif $document->getRestPaid() < 0}
+ ({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
+ {/if}
+
+ {/if}
+ {elseif get_class($document) eq 'OrderSlip'}
+ {displayPrice price=$document->total_products_tax_incl+$document->total_shipping_tax_incl currency=$currency->id}
+ {/if}
+ |
+
+ {if get_class($document) eq 'OrderInvoice'}
+ {if $document->getRestPaid()}
+
+
+ {l s='Enter payment'}
+
+ {/if}
+
+
+ {if $document->note eq ''}
+
+ {l s='Add note'}
+ {else}
+
+ {l s='Edit note'}
+ {/if}
+
+ {/if}
+ |
+
{if get_class($document) eq 'OrderInvoice'}
- {if !isset($document->is_delivery)}
|
|
- {/if}
{/if}
{foreachelse}
diff --git a/classes/order/Order.php b/classes/order/Order.php
index 79ba75e60..be4e7d223 100644
--- a/classes/order/Order.php
+++ b/classes/order/Order.php
@@ -1891,18 +1891,18 @@ class OrderCore extends ObjectModel
unset($invoices[$key]);
}
}
- $delivery_slips = $this->getDeliverySlipsCollection()->getResults();
- // @TODO review
- foreach ($delivery_slips as $key => $delivery) {
- $delivery->is_delivery = true;
- $delivery->date_add = $delivery->delivery_date;
- if (!$invoice->delivery_number) {
- unset($delivery_slips[$key]);
- }
- }
+ // $delivery_slips = $this->getDeliverySlipsCollection()->getResults();
+ // // @TODO review
+ // foreach ($delivery_slips as $key => $delivery) {
+ // $delivery->is_delivery = true;
+ // $delivery->date_add = $delivery->delivery_date;
+ // if (!$invoice->delivery_number) {
+ // unset($delivery_slips[$key]);
+ // }
+ // }
$order_slips = $this->getOrderSlipsCollection()->getResults();
- $documents = array_merge($invoices, $order_slips, $delivery_slips);
+ $documents = array_merge($invoices, $order_slips);
usort($documents, array('Order', 'sortDocuments'));
return $documents;
diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php
index 7a0b22572..1e841356a 100644
--- a/controllers/admin/AdminStatusesController.php
+++ b/controllers/admin/AdminStatusesController.php
@@ -402,28 +402,28 @@ class AdminStatusesControllerCore extends AdminController
'name' => 'name'
),
),
- array(
- 'type' => 'checkbox',
- 'name' => 'pdf_delivery',
- 'values' => array(
- 'query' => array(
- array('id' => 'on', 'name' => $this->l('Attach delivery slip PDF to email.'), 'val' => '1'),
- ),
- 'id' => 'id',
- 'name' => 'name'
- ),
- ),
- array(
- 'type' => 'checkbox',
- 'name' => 'shipped',
- 'values' => array(
- 'query' => array(
- array('id' => 'on', 'name' => $this->l('Set the order as shipped.'), 'val' => '1'),
- ),
- 'id' => 'id',
- 'name' => 'name'
- )
- ),
+ // array(
+ // 'type' => 'checkbox',
+ // 'name' => 'pdf_delivery',
+ // 'values' => array(
+ // 'query' => array(
+ // array('id' => 'on', 'name' => $this->l('Attach delivery slip PDF to email.'), 'val' => '1'),
+ // ),
+ // 'id' => 'id',
+ // 'name' => 'name'
+ // ),
+ // ),
+ // array(
+ // 'type' => 'checkbox',
+ // 'name' => 'shipped',
+ // 'values' => array(
+ // 'query' => array(
+ // array('id' => 'on', 'name' => $this->l('Set the order as shipped.'), 'val' => '1'),
+ // ),
+ // 'id' => 'id',
+ // 'name' => 'name'
+ // )
+ // ),
array(
'type' => 'checkbox',
'name' => 'paid',
@@ -435,17 +435,17 @@ class AdminStatusesControllerCore extends AdminController
'name' => 'name'
)
),
- array(
- 'type' => 'checkbox',
- 'name' => 'delivery',
- 'values' => array(
- 'query' => array(
- array('id' => 'on', 'name' => $this->l('Show delivery PDF.'), 'val' => '1'),
- ),
- 'id' => 'id',
- 'name' => 'name'
- )
- ),
+ // array(
+ // 'type' => 'checkbox',
+ // 'name' => 'delivery',
+ // 'values' => array(
+ // 'query' => array(
+ // array('id' => 'on', 'name' => $this->l('Show delivery PDF.'), 'val' => '1'),
+ // ),
+ // 'id' => 'id',
+ // 'name' => 'name'
+ // )
+ // ),
array(
'type' => 'select_template',
'is_customer_template' => 1,