From 017c82847482f3450e3b2b42275bee48bac3af4a Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Thu, 18 Apr 2019 16:04:42 +0530 Subject: [PATCH] Fix: Trim the narration of vouchers to remove cruft Fix: Do no tabstop on row edit buttons for a more consistent feel. --- brewman/views/services/voucher/issue.py | 4 ++-- brewman/views/services/voucher/journal.py | 4 ++-- brewman/views/services/voucher/purchase.py | 4 ++-- brewman/views/services/voucher/purchase_return.py | 4 ++-- overlord/src/app/issue/issue.component.html | 4 ++-- overlord/src/app/journal/journal.component.html | 4 ++-- overlord/src/app/payment/payment.component.html | 4 ++-- .../src/app/purchase-return/purchase-return.component.html | 4 ++-- overlord/src/app/purchase/purchase.component.html | 4 ++-- overlord/src/app/receipt/receipt.component.html | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/brewman/views/services/voucher/issue.py b/brewman/views/services/voucher/issue.py index d8277fea..bd566afa 100644 --- a/brewman/views/services/voucher/issue.py +++ b/brewman/views/services/voucher/issue.py @@ -11,7 +11,7 @@ def issue_create_voucher(json, user, dbsession): dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y") voucher = Voucher( date=dt, - narration=json["narration"], + narration=json["narration"].strip(), user_id=user.id, type=VoucherType.by_name("Issue"), ) @@ -105,7 +105,7 @@ def issue_create_journals(inventories, source, destination): def issue_update_voucher(voucher, json, user, dbsession): voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y") - voucher.narration = json["narration"] + voucher.narration = json["narration"].strip() voucher.user_id = user.id voucher.last_edit_date = datetime.datetime.utcnow() diff --git a/brewman/views/services/voucher/journal.py b/brewman/views/services/voucher/journal.py index 8f180423..9b0f1765 100644 --- a/brewman/views/services/voucher/journal.py +++ b/brewman/views/services/voucher/journal.py @@ -11,7 +11,7 @@ def journal_create_voucher(json, files, user, dbsession): dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y") voucher = Voucher( date=dt, - narration=json["narration"], + narration=json["narration"].strip(), is_starred=json["isStarred"], user_id=user.id, type=VoucherType.by_name(json["type"]), @@ -45,7 +45,7 @@ def journal_create_voucher(json, files, user, dbsession): def journal_update_voucher(voucher, json, files, user, dbsession): voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y") voucher.is_starred = json["isStarred"] - voucher.narration = json["narration"] + voucher.narration = json["narration"].strip() voucher.user_id = user.id voucher.posted = False voucher.last_edit_date = datetime.datetime.utcnow() diff --git a/brewman/views/services/voucher/purchase.py b/brewman/views/services/voucher/purchase.py index 2b80ba28..edbb4c56 100644 --- a/brewman/views/services/voucher/purchase.py +++ b/brewman/views/services/voucher/purchase.py @@ -21,7 +21,7 @@ def purchase_create_voucher(json, files, user, dbsession): dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y") voucher = Voucher( date=dt, - narration=json["narration"], + narration=json["narration"].strip(), is_starred=json["isStarred"], user_id=user.id, type=VoucherType.by_name(json["type"]), @@ -116,7 +116,7 @@ def purchase_create_journals(inventories, account_id, dbsession): def purchase_update_voucher(voucher, json, files, user, dbsession): voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y") voucher.is_starred = json["isStarred"] - voucher.narration = json["narration"] + voucher.narration = json["narration"].strip() voucher.user_id = user.id voucher.posted = False voucher.last_edit_date = datetime.datetime.utcnow() diff --git a/brewman/views/services/voucher/purchase_return.py b/brewman/views/services/voucher/purchase_return.py index 5db84e8f..11bae7a8 100644 --- a/brewman/views/services/voucher/purchase_return.py +++ b/brewman/views/services/voucher/purchase_return.py @@ -19,7 +19,7 @@ def purchase_return_create_voucher(json, files, user, dbsession): dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y") voucher = Voucher( date=dt, - narration=json["narration"], + narration=json["narration"].strip(), is_starred=json["isStarred"], user_id=user.id, type=VoucherType.by_name(json["type"]), @@ -112,7 +112,7 @@ def purchase_return_create_journals(inventories, account_id, dbsession): def purchase_return_update_voucher(voucher, json, files, user, dbsession): voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y") voucher.is_starred = json["isStarred"] - voucher.narration = json["narration"] + voucher.narration = json["narration"].strip() voucher.user_id = user.id voucher.posted = False voucher.last_edit_date = datetime.datetime.utcnow() diff --git a/overlord/src/app/issue/issue.component.html b/overlord/src/app/issue/issue.component.html index 8859c44e..f1d987e0 100644 --- a/overlord/src/app/issue/issue.component.html +++ b/overlord/src/app/issue/issue.component.html @@ -86,10 +86,10 @@ Action - - diff --git a/overlord/src/app/journal/journal.component.html b/overlord/src/app/journal/journal.component.html index 1065b4d2..89e09f31 100644 --- a/overlord/src/app/journal/journal.component.html +++ b/overlord/src/app/journal/journal.component.html @@ -68,10 +68,10 @@ Action - - diff --git a/overlord/src/app/payment/payment.component.html b/overlord/src/app/payment/payment.component.html index 9b07e058..8b9932ce 100644 --- a/overlord/src/app/payment/payment.component.html +++ b/overlord/src/app/payment/payment.component.html @@ -70,10 +70,10 @@ Action - - diff --git a/overlord/src/app/purchase-return/purchase-return.component.html b/overlord/src/app/purchase-return/purchase-return.component.html index c51ef7cf..182f3d29 100644 --- a/overlord/src/app/purchase-return/purchase-return.component.html +++ b/overlord/src/app/purchase-return/purchase-return.component.html @@ -94,10 +94,10 @@ Action - - diff --git a/overlord/src/app/purchase/purchase.component.html b/overlord/src/app/purchase/purchase.component.html index 2871029f..0c919be6 100644 --- a/overlord/src/app/purchase/purchase.component.html +++ b/overlord/src/app/purchase/purchase.component.html @@ -106,10 +106,10 @@ Action - - diff --git a/overlord/src/app/receipt/receipt.component.html b/overlord/src/app/receipt/receipt.component.html index 6a65a1eb..1458c40f 100644 --- a/overlord/src/app/receipt/receipt.component.html +++ b/overlord/src/app/receipt/receipt.component.html @@ -70,10 +70,10 @@ Action - -