Fix: Trim the narration of vouchers to remove cruft

Fix: Do no tabstop on row edit buttons for a more consistent feel.
This commit is contained in:
Amritanshu
2019-04-18 16:04:42 +05:30
parent 403b9a207a
commit 017c828474
10 changed files with 20 additions and 20 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()