From 07bd2a34fbe3270f91e5cd25ba2ca079e9af7ab2 Mon Sep 17 00:00:00 2001 From: Faheed Date: Thu, 18 Sep 2025 16:11:21 +0300 Subject: [PATCH] alignment in the pdf print and alingment of buttons in bill_card --- inventory/signals.py | 16 +++++++++++++--- templates/bill/includes/card_bill.html | 13 +++++++++++-- .../purchase_orders/po_detail_ar_pdf.html | 11 +++-------- .../purchase_orders/po_detail_en_pdf.html | 19 ++++++++----------- .../sales/estimates/estimate_preview_ar.html | 2 +- .../sales/estimates/estimate_preview_en.html | 11 +++++++---- .../sales/invoices/invoice_preview_ar.html | 2 +- .../sales/invoices/invoice_preview_en.html | 12 ++++++++---- 8 files changed, 52 insertions(+), 34 deletions(-) diff --git a/inventory/signals.py b/inventory/signals.py index e19327cf..f3af7710 100644 --- a/inventory/signals.py +++ b/inventory/signals.py @@ -1004,9 +1004,19 @@ def create_po_item_upload(sender, instance, created, **kwargs): for item in instance.get_itemtxs_data()[0]: dealer = models.Dealer.objects.get(entity=instance.entity) if item.bill_model and item.bill_model.is_paid(): - models.PoItemsUploaded.objects.get_or_create( - dealer=dealer, po=instance, item=item, status=instance.po_status - ) + models.PoItemsUploaded.objects.update_or_create( + dealer=dealer, po=instance, item=item, + defaults={ + "status":instance.po_status + } + ) + + # po_item = models.PoItemsUploaded.objects.get_or_create( + # dealer=dealer, po=instance, item=item, + # defaults={ + # "status":instance.po_status + # } + # ) # @receiver(post_save, sender=models.Staff) diff --git a/templates/bill/includes/card_bill.html b/templates/bill/includes/card_bill.html index 4873cba1..a523990b 100644 --- a/templates/bill/includes/card_bill.html +++ b/templates/bill/includes/card_bill.html @@ -50,7 +50,7 @@ {% modal_action bill 'get' entity_slug %} -
+
{% trans 'View' %} {% if perms.django_ledger.change_billmodel %} @@ -199,7 +199,7 @@ {% endif %}