roundedoffbug
This commit is contained in:
parent
09eb9bb75a
commit
c407d96e05
|
|
@ -438,7 +438,7 @@ const BSBillingEditQuantity = (props) => {
|
|||
};
|
||||
|
||||
const AddProductQuantity = async () => {
|
||||
let disCountprice = editedPrice - itemDiscountPrice
|
||||
let disCountprice = safeRound(editedPrice) - itemDiscountPrice
|
||||
let newPrice = safeRound(disCountprice > 0 ? disCountprice : props.Productdata.OrderRate);
|
||||
await dispatch(changeHoldOrderDtl(false));
|
||||
await dispatch(changePreviousOrderLength(CartOrderDetails?.length));
|
||||
|
|
@ -3156,10 +3156,10 @@ const BSBillingEditQuantity = (props) => {
|
|||
const updatedProduct = {
|
||||
...editedProduct,
|
||||
OrderQty: fixedQty,
|
||||
OrderRate: editedPrice > 0 ? editedPrice : editedProduct?.OrderRate,
|
||||
OrderRate: editedPrice > 0 ? safeRound(editedPrice) : editedProduct?.OrderRate,
|
||||
...calculateTaxAmounts({
|
||||
qty: qty,
|
||||
rate: editedPrice > 0 ? editedPrice : editedProduct?.OrderRate,
|
||||
rate: editedPrice > 0 ? safeRound(editedPrice) : editedProduct?.OrderRate,
|
||||
taxPercentage: editedProduct?.TaxPercentage,
|
||||
type: editedProduct?.Type,
|
||||
product: editedProduct,
|
||||
|
|
@ -3765,7 +3765,7 @@ const BSBillingEditQuantity = (props) => {
|
|||
<Form ref={formRef}>
|
||||
<Form.Item
|
||||
name="SellPrice"
|
||||
initialValue={editedPrice}
|
||||
initialValue={safeRound(editedPrice)}
|
||||
rules={[
|
||||
{
|
||||
pattern: /^(0\d+|[1-9]\d*)(\.\d+)?$/,
|
||||
|
|
@ -3833,7 +3833,7 @@ const BSBillingEditQuantity = (props) => {
|
|||
<Form ref={detailedFormRef}>
|
||||
<Form.Item
|
||||
name="SellPrice"
|
||||
initialValue={editedPrice}
|
||||
initialValue={safeRound(editedPrice)}
|
||||
rules={[
|
||||
{
|
||||
pattern: /^[0-9]\d*(\.\d+)?$/,
|
||||
|
|
@ -3951,7 +3951,7 @@ const BSBillingEditQuantity = (props) => {
|
|||
</Form.Item>
|
||||
</Form>
|
||||
</div>
|
||||
{itemDiscountPrice > 0 && editedPrice > 0 && <div className="EditQuantity-Quantity">
|
||||
{itemDiscountPrice > 0 && safeRound(editedPrice) > 0 && <div className="EditQuantity-Quantity">
|
||||
<div className="EditQuantity-itemname">
|
||||
{' '}
|
||||
{console.log(editedPrice, itemDiscountPrice, "itemDiscountPrice")}
|
||||
|
|
|
|||
Loading…
Reference in New Issue