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:
parent
403b9a207a
commit
017c828474
|
@ -11,7 +11,7 @@ def issue_create_voucher(json, user, dbsession):
|
||||||
dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
||||||
voucher = Voucher(
|
voucher = Voucher(
|
||||||
date=dt,
|
date=dt,
|
||||||
narration=json["narration"],
|
narration=json["narration"].strip(),
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
type=VoucherType.by_name("Issue"),
|
type=VoucherType.by_name("Issue"),
|
||||||
)
|
)
|
||||||
|
@ -105,7 +105,7 @@ def issue_create_journals(inventories, source, destination):
|
||||||
|
|
||||||
def issue_update_voucher(voucher, json, user, dbsession):
|
def issue_update_voucher(voucher, json, user, dbsession):
|
||||||
voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
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.user_id = user.id
|
||||||
voucher.last_edit_date = datetime.datetime.utcnow()
|
voucher.last_edit_date = datetime.datetime.utcnow()
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ def journal_create_voucher(json, files, user, dbsession):
|
||||||
dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
||||||
voucher = Voucher(
|
voucher = Voucher(
|
||||||
date=dt,
|
date=dt,
|
||||||
narration=json["narration"],
|
narration=json["narration"].strip(),
|
||||||
is_starred=json["isStarred"],
|
is_starred=json["isStarred"],
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
type=VoucherType.by_name(json["type"]),
|
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):
|
def journal_update_voucher(voucher, json, files, user, dbsession):
|
||||||
voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
||||||
voucher.is_starred = json["isStarred"]
|
voucher.is_starred = json["isStarred"]
|
||||||
voucher.narration = json["narration"]
|
voucher.narration = json["narration"].strip()
|
||||||
voucher.user_id = user.id
|
voucher.user_id = user.id
|
||||||
voucher.posted = False
|
voucher.posted = False
|
||||||
voucher.last_edit_date = datetime.datetime.utcnow()
|
voucher.last_edit_date = datetime.datetime.utcnow()
|
||||||
|
|
|
@ -21,7 +21,7 @@ def purchase_create_voucher(json, files, user, dbsession):
|
||||||
dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
||||||
voucher = Voucher(
|
voucher = Voucher(
|
||||||
date=dt,
|
date=dt,
|
||||||
narration=json["narration"],
|
narration=json["narration"].strip(),
|
||||||
is_starred=json["isStarred"],
|
is_starred=json["isStarred"],
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
type=VoucherType.by_name(json["type"]),
|
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):
|
def purchase_update_voucher(voucher, json, files, user, dbsession):
|
||||||
voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
||||||
voucher.is_starred = json["isStarred"]
|
voucher.is_starred = json["isStarred"]
|
||||||
voucher.narration = json["narration"]
|
voucher.narration = json["narration"].strip()
|
||||||
voucher.user_id = user.id
|
voucher.user_id = user.id
|
||||||
voucher.posted = False
|
voucher.posted = False
|
||||||
voucher.last_edit_date = datetime.datetime.utcnow()
|
voucher.last_edit_date = datetime.datetime.utcnow()
|
||||||
|
|
|
@ -19,7 +19,7 @@ def purchase_return_create_voucher(json, files, user, dbsession):
|
||||||
dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
dt = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
||||||
voucher = Voucher(
|
voucher = Voucher(
|
||||||
date=dt,
|
date=dt,
|
||||||
narration=json["narration"],
|
narration=json["narration"].strip(),
|
||||||
is_starred=json["isStarred"],
|
is_starred=json["isStarred"],
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
type=VoucherType.by_name(json["type"]),
|
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):
|
def purchase_return_update_voucher(voucher, json, files, user, dbsession):
|
||||||
voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
voucher.date = datetime.datetime.strptime(json["date"], "%d-%b-%Y")
|
||||||
voucher.is_starred = json["isStarred"]
|
voucher.is_starred = json["isStarred"]
|
||||||
voucher.narration = json["narration"]
|
voucher.narration = json["narration"].strip()
|
||||||
voucher.user_id = user.id
|
voucher.user_id = user.id
|
||||||
voucher.posted = False
|
voucher.posted = False
|
||||||
voucher.last_edit_date = datetime.datetime.utcnow()
|
voucher.last_edit_date = datetime.datetime.utcnow()
|
||||||
|
|
|
@ -86,10 +86,10 @@
|
||||||
<ng-container matColumnDef="action">
|
<ng-container matColumnDef="action">
|
||||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="center">
|
<mat-cell *matCellDef="let row" class="center">
|
||||||
<button mat-icon-button (click)="editRow(row)">
|
<button mat-icon-button tabindex="-1" (click)="editRow(row)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-icon-button color="warn" (click)="deleteRow(row)">
|
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
|
|
|
@ -68,10 +68,10 @@
|
||||||
<ng-container matColumnDef="action">
|
<ng-container matColumnDef="action">
|
||||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="center">
|
<mat-cell *matCellDef="let row" class="center">
|
||||||
<button mat-icon-button (click)="editRow(row)">
|
<button mat-icon-button tabindex="-1" (click)="editRow(row)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-icon-button color="warn" (click)="deleteRow(row)">
|
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
|
|
|
@ -70,10 +70,10 @@
|
||||||
<ng-container matColumnDef="action">
|
<ng-container matColumnDef="action">
|
||||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="center">
|
<mat-cell *matCellDef="let row" class="center">
|
||||||
<button mat-icon-button (click)="editRow(row)">
|
<button mat-icon-button tabindex="-1" (click)="editRow(row)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-icon-button color="warn" (click)="deleteRow(row)">
|
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
|
|
|
@ -94,10 +94,10 @@
|
||||||
<ng-container matColumnDef="action">
|
<ng-container matColumnDef="action">
|
||||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="center">
|
<mat-cell *matCellDef="let row" class="center">
|
||||||
<button mat-icon-button (click)="editRow(row)">
|
<button mat-icon-button tabindex="-1" (click)="editRow(row)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-icon-button color="warn" (click)="deleteRow(row)">
|
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
|
|
|
@ -106,10 +106,10 @@
|
||||||
<ng-container matColumnDef="action">
|
<ng-container matColumnDef="action">
|
||||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="center">
|
<mat-cell *matCellDef="let row" class="center">
|
||||||
<button mat-icon-button (click)="editRow(row)">
|
<button mat-icon-button tabindex="-1" (click)="editRow(row)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-icon-button color="warn" (click)="deleteRow(row)">
|
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
|
|
|
@ -70,10 +70,10 @@
|
||||||
<ng-container matColumnDef="action">
|
<ng-container matColumnDef="action">
|
||||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row" class="center">
|
<mat-cell *matCellDef="let row" class="center">
|
||||||
<button mat-icon-button (click)="editRow(row)">
|
<button mat-icon-button tabindex="-1" (click)="editRow(row)">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-icon-button color="warn" (click)="deleteRow(row)">
|
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
|
|
Loading…
Reference in New Issue