diff --git a/inventory/views.py b/inventory/views.py index 1f3b1de4..8c9cc63a 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -11152,7 +11152,6 @@ class BasePurchaseOrderActionActionView(BasePurchaseOrderActionActionViewBase): class PurchaseOrderModelDeleteView(PurchaseOrderModelDeleteViewBase): - template_name = "purchase_orders/po_delete.html" permission_required = "django_ledger.delete_purchaseordermodel" def get_success_url(self): @@ -11162,8 +11161,9 @@ class PurchaseOrderModelDeleteView(PurchaseOrderModelDeleteViewBase): level=messages.SUCCESS, ) return reverse( - "purchase_order_list", kwargs={"dealer_slug": self.kwargs["dealer_slug"]} + "purchase_order_list", kwargs={"dealer_slug": self.kwargs["dealer_slug"],"entity_slug":self.kwargs['entity_slug']} ) + class PurchaseOrderMarkAsDraftView(BasePurchaseOrderActionActionView): diff --git a/templates/bill/bill_detail.html b/templates/bill/bill_detail.html index c68457ef..c4df53a6 100644 --- a/templates/bill/bill_detail.html +++ b/templates/bill/bill_detail.html @@ -94,6 +94,7 @@ {% trans 'PO' %} + {% for bill_item in itemtxs_qs %} diff --git a/templates/plans/billing_info_create_or_update.html b/templates/plans/billing_info_create_or_update.html index a63bd0c1..34f5da3f 100644 --- a/templates/plans/billing_info_create_or_update.html +++ b/templates/plans/billing_info_create_or_update.html @@ -19,6 +19,7 @@ method="post" class="needs-validation" novalidate> {% csrf_token %} {{ form|crispy }} +
{{ _("Cancel") }} + type="submit">{{ _("Go Back") }}
diff --git a/templates/purchase_orders/includes/card_po.html b/templates/purchase_orders/includes/card_po.html index d5f057c4..af856b04 100644 --- a/templates/purchase_orders/includes/card_po.html +++ b/templates/purchase_orders/includes/card_po.html @@ -45,7 +45,7 @@ href="{% url 'purchase_order_list' request.dealer.slug request.dealer.entity.slug %}" title="Click to view the complete list of Purchase Orders" role="button"> - {% trans 'PO List' %} + {% trans 'Purchase Order List' %}

@@ -135,15 +135,29 @@ {% endif %} {% if po_model.can_delete %} {% if perms.django_ledger.delete_purchaseordermodel %} - + + {% endif %} {% endif %} {% if po_model.can_void %} {% endif %} diff --git a/templates/purchase_orders/po_confirm_delete.html b/templates/purchase_orders/po_confirm_delete.html index e0e90738..7a4f0789 100644 --- a/templates/purchase_orders/po_confirm_delete.html +++ b/templates/purchase_orders/po_confirm_delete.html @@ -1,19 +1,12 @@ - -{% extends "base.html" %} -{%load i18n %} -{% block title %}{% trans "Confirm Delete"%} - {{ block.super }}{% endblock %} -{% block content %} -
-

{% trans "Confirm Deletion" %}

-

- {% trans "Are you sure you want to delete the Purchase Order" %} "{{ object.po_number }}"? -

-
- {% csrf_token %} - - {% trans "Cancel" %} -
-
-{% endblock %} - +{% load i18n %} +
+ {% csrf_token %} +

+ {% blocktrans with po_number=po_model.po_number %} + Are you sure you want to delete #{{ po_number }}? + {% endblocktrans %} +

+ + {% trans "No" %} +
\ No newline at end of file diff --git a/templates/purchase_orders/po_delete.html b/templates/purchase_orders/po_delete.html deleted file mode 100644 index 28f22968..00000000 --- a/templates/purchase_orders/po_delete.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends 'base.html' %} -{% load i18n %} -{% load static %} -{% load django_ledger %} -{% block title %} - {% trans "Delete Purchase Order" %} -{% endblock %} -{% block content %} -
-
-
- {% csrf_token %} -
-
-

- {% blocktrans %}Are you sure you want to delete - Purchase Order {{ po_model.po_number }}?{% endblocktrans %} -

-

- {% trans "All transactions associated with this Purchase Order will be deleted.If you want to void the PO instead," %} - {% trans "click here" %} -

-
- {% trans 'Go Back' %} - -
-
-
-
-
-
-{% endblock %} - - diff --git a/templates/sales/invoices/invoice_detail.html b/templates/sales/invoices/invoice_detail.html index 9c9072ed..16637121 100644 --- a/templates/sales/invoices/invoice_detail.html +++ b/templates/sales/invoices/invoice_detail.html @@ -142,8 +142,8 @@ {% endif %} {% endif %} {% endif %} - {% trans 'Preview' %} + {% trans 'Preview' %}