2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 14:50:56 +00:00

fix: return status colors

This commit is contained in:
akshayitzme 2023-08-01 11:12:13 +05:30
parent 28ba237aba
commit 3349f1af10
2 changed files with 5 additions and 5 deletions

View File

@ -273,14 +273,14 @@ function getSubmittableDocStatus(doc: RenderData | Doc) {
if ( if (
[ModelNameEnum.Shipment, ModelNameEnum.PurchaseReceipt].includes( [ModelNameEnum.Shipment, ModelNameEnum.PurchaseReceipt].includes(
doc.schemaName as ModelNameEnum doc.schema.name as ModelNameEnum
) )
) { ) {
if (doc.isReturn && doc.isSubmitted) { if (!!doc.returnAgainst && doc.submitted && !doc.cancelled) {
return 'Return'; return 'Return';
} }
if (doc.isItemsReturned && doc.isSubmitted) { if (doc.isReturned && doc.submitted && !doc.cancelled) {
return 'ReturnIssued'; return 'ReturnIssued';
} }
} }

View File

@ -63,8 +63,8 @@ const statusColorMap: Record<Status, UIColors> = {
Paid: 'green', Paid: 'green',
Saved: 'blue', Saved: 'blue',
Submitted: 'blue', Submitted: 'blue',
Return: 'orange', Return: 'green',
ReturnIssued: 'gray', ReturnIssued: 'green',
}; };
function getStatus(doc: Doc) { function getStatus(doc: Doc) {