|
|
|
@ -22,7 +22,7 @@ type StatusButton struct { |
|
|
|
var statusButtons = []StatusButton{ |
|
|
|
{"draft", "Draft Invoice", "success-button", "Are you sure you want to draft this invoice?"}, |
|
|
|
{"ok", "Ok Invoice", "success-button", "Are you sure you want to mark this invoice as OK?"}, |
|
|
|
{"fail", "Fail Invoice", "caution-button", "Are you sure you want to fail this invoice?"}, |
|
|
|
{"failed", "Fail Invoice", "caution-button", "Are you sure you want to fail this invoice?"}, |
|
|
|
{"pending_accounting", "Pending Invoice", "caution-button", "Are you sure you want to mark this invoice as pending?"}, |
|
|
|
{"processed", "Process Invoice", "warning-button", "Are you sure you want to process this invoice?"}, |
|
|
|
{"void", "Void Invoice", "warning-button", "Are you sure you want to void this invoice?"}, |
|
|
|
@ -186,7 +186,7 @@ func UpdateInvoiceStatusHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
// Validate the status
|
|
|
|
validStatuses := map[string]bool{ |
|
|
|
"draft": true, |
|
|
|
"fail": true, |
|
|
|
"failed": true, |
|
|
|
"ok": true, |
|
|
|
"pending_accounting": true, |
|
|
|
"processed": true, |
|
|
|
|