2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 19:09:01 +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 (
[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';
}
if (doc.isItemsReturned && doc.isSubmitted) {
if (doc.isReturned && doc.submitted && !doc.cancelled) {
return 'ReturnIssued';
}
}

View File

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