mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
fix: return status colors
This commit is contained in:
parent
28ba237aba
commit
3349f1af10
@ -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';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user