diff --git a/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx b/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx index d7adeb4fe..0ef98325a 100644 --- a/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx +++ b/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx @@ -245,7 +245,7 @@ function BillEnterModalContainer({ return ( ( - - ), - additional: (record, index) => ( - - {() => { - const line = getFieldsValue(["billlines"]).billlines[index]; - if (!!!line) return null; - const lineDiscount = ( - 1 - - Math.round((line.actual_cost / line.actual_price) * 100) / 100 - ).toPrecision(2); + + {() => { + const line = getFieldsValue(["billlines"]).billlines[index]; + if (!!!line) return null; + const lineDiscount = 1 - line.actual_cost / line.actual_price; - if (lineDiscount - discount === 0) return
; - return ; - }} - + return ( + + 0.005 + ? "red" + : "green", + }} + /> + + ); + }} + + } + /> ), + // additional: (record, index) => ( + // + // {() => { + // const line = getFieldsValue(["billlines"]).billlines[index]; + // if (!!!line) return null; + // const lineDiscount = ( + // 1 - + // Math.round((line.actual_cost / line.actual_price) * 100) / 100 + // ).toPrecision(2); + + // return ( + // + // + // + // ); + // }} + // + // ), }, { title: t("billlines.fields.cost_center"),