diff --git a/src/new/src/PSC/Shop/EntityBundle/Entity/Orderpos.php b/src/new/src/PSC/Shop/EntityBundle/Entity/Orderpos.php index 75d598d52..2740c101b 100755 --- a/src/new/src/PSC/Shop/EntityBundle/Entity/Orderpos.php +++ b/src/new/src/PSC/Shop/EntityBundle/Entity/Orderpos.php @@ -123,6 +123,18 @@ class Orderpos #[ORM\Column(name: 'external_approval_message', type: 'text', nullable: true)] private ?string $externalApprovalMessage = null; + + /** + * Wurde die Position vom Kunden widerrufen? + */ + #[ORM\Column(name: 'revoked', type: 'boolean', nullable: true)] + private ?bool $revoked = null; + + /** + * Zeitpunkt des Widerrufs durch den Kunden. + */ + #[ORM\Column(name: 'revoked_at', type: 'datetime', nullable: true)] + private ?\DateTimeInterface $revokedAt = null; /** * @var Product */ @@ -1059,4 +1071,30 @@ class Orderpos { $this->externalApprovalMessage = $message; } + + /** + * Wurde die Position vom Kunden widerrufen? + */ + public function isRevoked(): bool + { + return (bool) $this->revoked; + } + + public function setRevoked(?bool $revoked): void + { + $this->revoked = $revoked; + } + + /** + * Zeitpunkt des Widerrufs. + */ + public function getRevokedAt(): ?\DateTimeInterface + { + return $this->revokedAt; + } + + public function setRevokedAt(?\DateTimeInterface $revokedAt): void + { + $this->revokedAt = $revokedAt; + } } diff --git a/src/new/src/PSC/Shop/EntityBundle/Entity/Product.php b/src/new/src/PSC/Shop/EntityBundle/Entity/Product.php index 716993411..1fc888f69 100755 --- a/src/new/src/PSC/Shop/EntityBundle/Entity/Product.php +++ b/src/new/src/PSC/Shop/EntityBundle/Entity/Product.php @@ -584,6 +584,14 @@ class Product #[ORM\Column(name: 'not_buy', type: 'boolean')] protected $notBuy; + /** + * Widerrufsbutton im Bestellablauf aktivieren + * + * @var boolean + */ + #[ORM\Column(name: 'revoke_button_enable', type: 'boolean', nullable: true)] + protected $revokeButtonEnable; + /** * Packageformat * @@ -907,6 +915,7 @@ class Product { $this->enable = false; $this->notBuy = false; + $this->revokeButtonEnable = false; $this->private = false; $this->displayNotInOverview = false; $this->uuid = UUID::uuid4(); @@ -1083,6 +1092,26 @@ class Product $this->notBuy = $notBuy; } + /** + * Ist der Widerrufsbutton für dieses Produkt aktiviert? + * + * @return boolean + */ + public function isRevokeButtonEnable() + { + return (bool) $this->revokeButtonEnable; + } + + /** + * Setzt, ob der Widerrufsbutton für dieses Produkt aktiviert ist + * + * @param boolean $revokeButtonEnable + */ + public function setRevokeButtonEnable($revokeButtonEnable) + { + $this->revokeButtonEnable = $revokeButtonEnable; + } + /** * Ist das Produkt privatisiert? * diff --git a/src/new/src/PSC/Shop/OrderBundle/Resources/translations/core_order_detail.de.yaml b/src/new/src/PSC/Shop/OrderBundle/Resources/translations/core_order_detail.de.yaml index 005fbd4a4..2930f8604 100755 --- a/src/new/src/PSC/Shop/OrderBundle/Resources/translations/core_order_detail.de.yaml +++ b/src/new/src/PSC/Shop/OrderBundle/Resources/translations/core_order_detail.de.yaml @@ -52,6 +52,21 @@ brutto: Brutto Preis vat: MwSt. positions: Positionen +and: und +nameDetails: Name / Details +propertiesEdition: Eigenschaften / Auflage +revokeStatus: Widerruf / Status +prices: Preise +actions: Aktionen +revokePossible: Widerruf möglich +revokeNotPossible: Widerruf nicht möglich +revokeDoneAt: Widerruf erfolgt am +revokeBy: durch +customerHint: Hinweis für den Kunden +printPartnerHint: Hinweis für den Druckpartner +notifyPrintPartner: Printpartner benachrichtigen +showCustomerInAccount: Dem Kunden in seinem Account anzeigen +label: Label addresses: Adressen billingaddress: Rechnungsanschrift shippingaddress: Lieferanschrift diff --git a/src/new/src/PSC/Shop/OrderBundle/Resources/translations/core_order_detail.en.yaml b/src/new/src/PSC/Shop/OrderBundle/Resources/translations/core_order_detail.en.yaml index 4e3412756..353e279b5 100755 --- a/src/new/src/PSC/Shop/OrderBundle/Resources/translations/core_order_detail.en.yaml +++ b/src/new/src/PSC/Shop/OrderBundle/Resources/translations/core_order_detail.en.yaml @@ -49,6 +49,21 @@ brutto: Gross Price vat: Vat positions: Positions +and: and +nameDetails: Name / Details +propertiesEdition: Properties / Quantity +revokeStatus: Revocation / Status +prices: Prices +actions: Actions +revokePossible: Revocation possible +revokeNotPossible: Revocation not possible +revokeDoneAt: Revoked on +revokeBy: by +customerHint: Note for the customer +printPartnerHint: Note for the print partner +notifyPrintPartner: Notify print partner +showCustomerInAccount: Show to customer in their account +label: Label addresses: Addresses billingaddress: Billing Address shippingaddress: Shipping Address diff --git a/src/new/src/PSC/Shop/OrderBundle/Resources/views/backend/detail/show.html.twig b/src/new/src/PSC/Shop/OrderBundle/Resources/views/backend/detail/show.html.twig index 39b67d42a..ab7b29fe2 100755 --- a/src/new/src/PSC/Shop/OrderBundle/Resources/views/backend/detail/show.html.twig +++ b/src/new/src/PSC/Shop/OrderBundle/Resources/views/backend/detail/show.html.twig @@ -433,79 +433,103 @@
| {{'Pos'|trans}} | -{{'name'|trans}} | -{{'wkpos1'|trans}} | -{{'wkpos2'|trans}} | -{{'properties'|trans}} | -{{'status'|trans}} | -{{'netto'|trans}} | -{{'vat'|trans}} | -{{'brutto'|trans}} | -+ | {{'Pos'|trans}} | +{{'nameDetails'|trans}} | +{{'wkpos1'|trans}} {{'and'|trans}} {{'wkpos2'|trans}} | +{{'propertiesEdition'|trans}} | +{{'revokeStatus'|trans}} | +{{'prices'|trans}} | +{{'actions'|trans}} | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ pos.obj.pos }} | -
- {{ pos.obj.product.title }}
- ArtNr intern: {{ pos.obj.product.nrIntern }}
- {{ 'weight'|trans }}: {{ pos.obj.weight }}
- |
- {{ pos.obj.basketfield1 }} | -{{ pos.obj.basketfield2 }} | -- |
-
-
-
- {% for status in orderStatuse.getOrderPosStatuse %}
-
- {{ status.internalName|trans({}, 'status') }}
-
- {% endfor %}
+ {{ pos.obj.pos }} |
+
+ {# Name / Details #}
+
+ {{ pos.obj.product.title }}
+ |
- ArtNr intern: {{ pos.obj.product.nrIntern }}
+ {{ 'weight'|trans }}: {{ pos.obj.weight }} g
+
+ {% if pos.objDoc.setConfig|length > 0 %}
+
+
+ {% endif %}
+
+ {# Vorschaubilder über denselben Mechanismus wie in der Auftragsliste:
+ gated über das UploadTypeObject (canPreview) und die Position-Model-Uploads.
+ Andernfalls – identisch zur Liste – der "not available"-Platzhalter. #}
+ {% set uploadType = posModel.uploadTypeObject %}
+ Set bestehend aus: +
+ {% if uploadType and uploadType.canPreview and posModel.uploads|length > 0 %}
+
+
+
+ {% for upload in posModel.uploads %}
+
+ {% else %}
+
+
+ {% endfor %}
+
+
+ not available
+
+ {% endif %}
+
+ {% if shop.docLabelPosition != "" %}{{'label'|trans}}{% endif %}
+ {% if shop.docJobticketPosition != "" %}{{'jobticket'|trans}}{% endif %}
+ {% if pos.obj.layouterMode == 4 and pos.objDoc %}
+
+
+ Layouter öffnen
+
+ {% endif %}
{{ pos.obj.priceAllNetto|number_format(2, ',', '.') }}€ |
- {{ pos.obj.priceAllSteuer|number_format(2, ',', '.') }}€ |
- {{ pos.obj.priceAllBrutto|number_format(2, ',', '.') }}€ |
-
- {% if pos.obj.layouterMode == 4 and pos.objDoc %}
-
-
- Layouter öffnen
-
+
+ {# WK_Pos_1 / WK_Pos_2 – Hinweise #}
+ |
+ {% if pos.obj.basketfield1 %}
+ |
- {{'customerHint'|trans}} +{{ pos.obj.basketfield1 }} + {% endif %} + {% if pos.obj.basketfield2 %} +{{'printPartnerHint'|trans}} +{{ pos.obj.basketfield2 }} {% endif %}
- |
- {% if pos.objDoc.setConfig|length > 0 %}
- |
- Set bestehend aus: -
- |
- |
+
+ {# Eigenschaften / Auflage #}
+ |
{% if pos.objCalc %}
- |
-
- |
-
+
+ {# Widerruf / Status #}
+
+ {% if pos.obj.revoked %}
+ |
+
+ {# Preise #}
+
+
+
+ {{'revokeDoneAt'|trans}}
+ {% if pos.obj.revokedAt %}{{ pos.obj.revokedAt|date('d.m.Y H:i') }} Uhr{% endif %}
+ {% if order.contact %}
+ {% elseif pos.obj.product.revokeButtonEnable %}
+ {{'revokeBy'|trans}} {{ order.contact.firstname }} {{ order.contact.lastname }}{% endif %} + +
+
+ {{'revokePossible'|trans}}
+
+ {% else %}
+
+
+ {{'revokeNotPossible'|trans}}
+
+ {% endif %}
+
+
+
+
+
+ {% for status in orderStatuse.getOrderPosStatuse %}
+
+ {{ status.internalName|trans({}, 'status') }}
+
+ {% endfor %}
+
+
+ |
+
+ {# Aktionen #}
+
+
+
+
+
+
+
+ |
+
{{ form_start(pos.formProd) }}
-
- {{ form_widget(pos.formProd.printPartnerEmail) }}
+
+ {{ form_widget(pos.formProd.printPartnerEmail) }}
{{ form_rest(pos.formProd) }}
-
{{ form_end(pos.formProd) }}
+
{{ form_start(pos.formProdinfo) }}
-
{% if posModel.reOrder %}
@@ -545,45 +629,6 @@
{{ form_widget(pos.formProdinfo.customerInfo) }}
+
+ {{ form_widget(pos.formProdinfo.customerInfo) }}
{{ form_rest(pos.formProdinfo) }}
-
{{ form_end(pos.formProdinfo) }}
- |
-
- {% if shop.docOfferPosition != "" %}{{'offer'|trans}}{% endif %}
- {% if shop.docOrderPosition != "" %}{{'order'|trans}}{% endif %}
- {% if shop.docInvoicePosition != "" %}{{'invoice'|trans}}{% endif %}
- {% if shop.docDeliveryPosition != "" %}{{'deliverynote'|trans}}{% endif %}
- {% if shop.docLabelPosition != "" %}{{'labels'|trans}}{% endif %}
- {% if shop.docJobticketPosition != "" %}{{'jobticket'|trans}}{% endif %}
- {% if shop.docStornoPosition != "" %}{{'cancel'|trans}}{% endif %}
-
-
- |
-
- {% for upload in pos.obj.uploads %}
-
-
-
- {% endfor %}
-
- | | |||||||||||||||||||||||||||||||