Skip to content
Code-Schnipsel Gruppen Projekte
Commit bac7ef8d erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

feat: Payment informations; Link to the invoice pdf

Übergeordneter 77c9eb25
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -21,10 +21,11 @@ define('package/quiqqer/order/bin/frontend/controls/order/Window', [
Type : 'package/quiqqer/order/bin/frontend/controls/order/Window',
options: {
hash : false,
maxHeight: 600,
maxWidth : 800,
icon : 'fa fa-shopping-basket'
hash : false,
maxHeight : 800,
maxWidth : 800,
icon : 'fa fa-shopping-basket',
closeButtonText: QUILocale.get('quiqqer/system', 'close')
},
initialize: function (options) {
......
......@@ -558,6 +558,47 @@
<de><![CDATA[Der Status der Bestellung wurde geändert in: [status]]]></de>
<en><![CDATA[The status of the purchase order has been changed to: [status]]]></en>
</locale>
<locale name="control.order.details.title">
<de><![CDATA[Bestelldetails]]></de>
<en><![CDATA[Order details]]></en>
</locale>
<locale name="control.order.details.date">
<de><![CDATA[Bestellungsdatum]]></de>
<en><![CDATA[Order date]]></en>
</locale>
<locale name="control.order.details.orderNo">
<de><![CDATA[Bestell-Nr.]]></de>
<en><![CDATA[Order no.]]></en>
</locale>
<locale name="control.order.details.invoice">
<de><![CDATA[Rechnung]]></de>
<en><![CDATA[Invoice]]></en>
</locale>
<locale name="control.order.invoiceAddress.title">
<de><![CDATA[Rechnungsaddresse]]></de>
<en><![CDATA[Invoice address]]></en>
</locale>
<locale name="control.order.overview.title">
<de><![CDATA[Bestellübersicht]]></de>
<en><![CDATA[Order overview]]></en>
</locale>
<locale name="control.order.overview.subSum">
<de><![CDATA[Zwischensumme]]></de>
<en><![CDATA[Subtotal]]></en>
</locale>
<locale name="control.order.overview.sum">
<de><![CDATA[Gesammtsumme]]></de>
<en><![CDATA[Total]]></en>
</locale>
<locale name="control.order.article.title">
<de><![CDATA[Artikel]]></de>
<en><![CDATA[Article]]></en>
</locale>
<locale name="control.order.payment.title">
<de><![CDATA[Zahlungsart]]></de>
<en><![CDATA[Payment method]]></en>
</locale>
</groups>
<groups name="quiqqer/order" datatype="js">
......
......@@ -28,9 +28,11 @@
width: 100%;
}
.quiqqer-order-control-order-information-payment,
.quiqqer-order-control-order-information-invoiceAddress,
.quiqqer-order-control-order-information-orderData {
float: left;
margin-bottom: 20px;
width: 50%;
}
......@@ -51,13 +53,16 @@
text-align: right;
}
.quiqqer-order-control-order-information-payment {
clear: both;
}
/** Article
========================================== */
.quiqqer-order-control-order-articles {
float: left;
border-top: 1px solid #DEDEDE;
margin-top: 20px;
padding-top: 20px;
width: 100%;
}
......
<header class="quiqqer-order-control-order-header">
<h1>Bestelldetails</h1>
<h1>
{locale group="quiqqer/order" var="control.order.details.title"}
</h1>
<div class="quiqqer-order-control-order-header-date">
<span>{locale group="quiqqer/order" var="control.profile.orders.order.date"}</span>
<span>{locale group="quiqqer/order" var="control.order.details.date"}</span>
<span>{$Order->getCreateDate()}</span>
</div>
<span class="quiqqer-order-control-order-header-placer">|</span>
<div class="quiqqer-order-control-order-header-id">
<span>{locale group="quiqqer/order" var="control.profile.orders.order.orderNo"}</span>
<span>{locale group="quiqqer/order" var="control.order.details.orderNo"}</span>
<span>{$Order->getId()}</span>
</div>
<span class="quiqqer-order-control-order-header-placer">|</span>
<div class="quiqqer-order-control-order-header-id">
{if $Order->isPosted()}
<a href="{$Order->getAttribute('downloadLink')}" target="_blank">
<span class="fa fa-file-pdf-o"></span>
<span>{locale group="quiqqer/order" var="control.order.details.invoice"}</span>
</a>
{else if $Order->isSuccessful() === false}
<a href="{$orderUrl}" target="_blank" class="">
<span class="fa fa-shopping-basket"></span>
<span>{locale group="quiqqer/order" var="control.order.details.continuePayment"}</span>
</a>
{/if}
</div>
</header>
<div class="quiqqer-order-control-order-information">
<section class="quiqqer-order-control-order-information-invoiceAddress">
<header>
<h2>Rechnungsaddresse</h2>
<h2>
{locale group="quiqqer/order" var="control.order.invoiceAddress.title"}
</h2>
</header>
<span>{locale group="quiqqer/order" var="control.profile.orders.order.invoiceAddress"}</span>
{if $Invoice}
......@@ -32,12 +52,16 @@
<section class="quiqqer-order-control-order-information-orderData">
<header>
<h2>Bestellübersicht</h2>
<h2>
{locale group="quiqqer/order" var="control.order.overview.title"}
</h2>
</header>
<table class="quiqqer-order-control-order-information-orderData-table">
<tr>
<td>Zwischensumme</td>
<td>
{locale group="quiqqer/order" var="control.order.overview.subSum"}
</td>
<td class="quiqqer-order-control-order-information-orderData-factor-subSum">
{$Calculation->getSubSum()->formatted()}
</td>
......@@ -51,18 +75,33 @@
</tr>
{/foreach}
<tr>
<td>Gesammtsumme</td>
<td>
{locale group="quiqqer/order" var="control.order.overview.sum"}
</td>
<td class="quiqqer-order-control-order-information-orderData-sum">
{$Calculation->getSum()->formatted()}
</td>
</tr>
</table>
</section>
{if $Payment}
<section class="quiqqer-order-control-order-information-payment">
<header>
<h2>
{locale group="quiqqer/order" var="control.order.payment.title"}
</h2>
</header>
{$Payment->getTitle()}
</section>
{/if}
</div>
<section class="quiqqer-order-control-order-articles">
<header>
<h2>Artikel</h2>
<h2>
{locale group="quiqqer/order" var="control.order.article.title"}
</h2>
</header>
{assign var=pos value=1}
......
......@@ -61,9 +61,15 @@ protected function onCreate()
return '';
}
// invoice
$Invoice = null;
$View = $Order->getView();
$View->setAttribute(
'downloadLink',
URL_OPT_DIR.'quiqqer/order/bin/frontend/order.pdf.php?order='.$View->getHash()
);
// invoice
try {
$Invoice = $Order->getInvoice();
} catch (QUI\Exception $Exception) {
......@@ -72,11 +78,12 @@ protected function onCreate()
// template
$Engine->assign([
'Order' => $Order,
'Articles' => $Order->getArticles(),
'Order' => $View,
'Articles' => $View->getArticles(),
'Invoice' => $Invoice,
'Calculation' => $Order->getPriceCalculation(),
'PriceFactors' => $Order->getArticles()->getPriceFactors(),
'Calculation' => $View->getPriceCalculation(),
'PriceFactors' => $View->getArticles()->getPriceFactors(),
'Payment' => $View->getPayment()
]);
return $Engine->fetch(dirname(__FILE__).'/Order.html');
......
......@@ -34,6 +34,8 @@ class OrderView extends QUI\QDOM implements OrderInterface
* OrderView constructor.
*
* @param Order $Order
*
* @throws QUI\Exception
*/
public function __construct(Order $Order)
{
......@@ -137,11 +139,24 @@ public function isPosted()
return $this->Order->isPosted();
}
/**
* @return array
*/
public function getData()
{
return $this->Order->getData();
}
/**
* @return QUI\ERP\Accounting\Calculations
* @throws QUI\ERP\Exception
* @throws QUI\Exception
*/
public function getPriceCalculation()
{
return $this->Order->getPriceCalculation();
}
/**
* @param string $key
* @return mixed|null
......@@ -212,7 +227,9 @@ public function getInvoiceAddress()
/**
* @return \QUI\ERP\Accounting\Invoice\Invoice
* @throws \QUI\ERP\Accounting\Invoice\Exception
*
* @throws QUI\Exception
* @throws QUI\ERP\Accounting\Invoice\Exception
*/
public function getInvoice()
{
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren