In the WOTRACK --> Actuals tab:
I want to add a button to the Actuals (Labor) table control that lets the user manually approve/unapprove the labor actual
here is a script that I am trying to use:
# Check the current approval status of the labor transaction
currentApprovalStatus = mbo.getBoolean("GENAPPRSERVRECEIPT")
# Toggle the approval status
if currentApprovalStatus:
# Disapprove the labor transaction
mbo.setValue("GENAPPRSERVRECEIPT", 0)
# Additional logic for disapproving, if needed
service.log("Labor transaction disapproved.")
else:
# Approve the labor transaction
mbo.setValue("GENAPPRSERVRECEIPT", 1)
mbo.approveLaborTransaction()
# Additional logic for approving, if needed
service.log("Labor transaction approved.")
Below is a photo of how I want the button to be. I want it so that it has the same characteristics as the delete button (TRASH CAN SYMBOL) but instead of deleting it just approves or unapproves the labor actual and it must appear in each labor actual row so that it only does changes on the specific labor actual.
How can this be created?