Fix time entry 500 and inventory edit pencil visibility
- Remove parseInt() from time entry worker select — GUIDs were destroyed to NaN → sent as null → FindByIdAsync(null) threw 500 - Ledger pencil: also show for Adjustment rows (no PO) so scan-without-job entries get an edit button, not just JobUsage rows - InventoryController: always write JobUsage type for scan-based logs; accept Adjustment in edit endpoints; promote Adjustment→JobUsage when a job is assigned via edit Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -205,7 +205,7 @@
|
||||
</td>
|
||||
<td><small class="text-muted">@t.Notes</small></td>
|
||||
<td>
|
||||
@if (t.TransactionType == "JobUsage")
|
||||
@if (t.TransactionType == "JobUsage" || (t.TransactionType == "Adjustment" && t.PurchaseOrderId == null))
|
||||
{
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm py-0 px-1"
|
||||
title="Edit usage record"
|
||||
|
||||
@@ -2795,7 +2795,7 @@
|
||||
|
||||
async function save() {
|
||||
const id = parseInt(document.getElementById('teEntryId').value);
|
||||
const workerId = parseInt(document.getElementById('teWorkerId').value);
|
||||
const workerId = document.getElementById('teWorkerId').value;
|
||||
const workDate = document.getElementById('teWorkDate').value;
|
||||
const hours = parseFloat(document.getElementById('teHoursWorked').value);
|
||||
const stage = document.getElementById('teStage').value.trim();
|
||||
|
||||
Reference in New Issue
Block a user