Merge pull request 'roundedoffbug' (#249) from priceoverride into main
Reviewed-on: Pozomind/pozo-retail-app#249
This commit is contained in:
commit
93f5b0e12b
|
|
@ -438,7 +438,7 @@ const BSBillingEditQuantity = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const AddProductQuantity = async () => {
|
const AddProductQuantity = async () => {
|
||||||
let disCountprice = editedPrice - itemDiscountPrice
|
let disCountprice = safeRound(editedPrice) - itemDiscountPrice
|
||||||
let newPrice = safeRound(disCountprice > 0 ? disCountprice : props.Productdata.OrderRate);
|
let newPrice = safeRound(disCountprice > 0 ? disCountprice : props.Productdata.OrderRate);
|
||||||
await dispatch(changeHoldOrderDtl(false));
|
await dispatch(changeHoldOrderDtl(false));
|
||||||
await dispatch(changePreviousOrderLength(CartOrderDetails?.length));
|
await dispatch(changePreviousOrderLength(CartOrderDetails?.length));
|
||||||
|
|
@ -3164,10 +3164,10 @@ const BSBillingEditQuantity = (props) => {
|
||||||
const updatedProduct = {
|
const updatedProduct = {
|
||||||
...editedProduct,
|
...editedProduct,
|
||||||
OrderQty: fixedQty,
|
OrderQty: fixedQty,
|
||||||
OrderRate: editedPrice > 0 ? editedPrice : editedProduct?.OrderRate,
|
OrderRate: editedPrice > 0 ? safeRound(editedPrice) : editedProduct?.OrderRate,
|
||||||
...calculateTaxAmounts({
|
...calculateTaxAmounts({
|
||||||
qty: qty,
|
qty: qty,
|
||||||
rate: editedPrice > 0 ? editedPrice : editedProduct?.OrderRate,
|
rate: editedPrice > 0 ? safeRound(editedPrice) : editedProduct?.OrderRate,
|
||||||
taxPercentage: editedProduct?.TaxPercentage,
|
taxPercentage: editedProduct?.TaxPercentage,
|
||||||
type: editedProduct?.Type,
|
type: editedProduct?.Type,
|
||||||
product: editedProduct,
|
product: editedProduct,
|
||||||
|
|
@ -3773,7 +3773,7 @@ const BSBillingEditQuantity = (props) => {
|
||||||
<Form ref={formRef}>
|
<Form ref={formRef}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="SellPrice"
|
name="SellPrice"
|
||||||
initialValue={editedPrice}
|
initialValue={safeRound(editedPrice)}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
pattern: /^(0\d+|[1-9]\d*)(\.\d+)?$/,
|
pattern: /^(0\d+|[1-9]\d*)(\.\d+)?$/,
|
||||||
|
|
@ -3841,7 +3841,7 @@ const BSBillingEditQuantity = (props) => {
|
||||||
<Form ref={detailedFormRef}>
|
<Form ref={detailedFormRef}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="SellPrice"
|
name="SellPrice"
|
||||||
initialValue={editedPrice}
|
initialValue={safeRound(editedPrice)}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
pattern: /^[0-9]\d*(\.\d+)?$/,
|
pattern: /^[0-9]\d*(\.\d+)?$/,
|
||||||
|
|
@ -3959,7 +3959,7 @@ const BSBillingEditQuantity = (props) => {
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
{itemDiscountPrice > 0 && editedPrice > 0 && <div className="EditQuantity-Quantity">
|
{itemDiscountPrice > 0 && safeRound(editedPrice) > 0 && <div className="EditQuantity-Quantity">
|
||||||
<div className="EditQuantity-itemname">
|
<div className="EditQuantity-itemname">
|
||||||
{' '}
|
{' '}
|
||||||
{console.log(editedPrice, itemDiscountPrice, "itemDiscountPrice")}
|
{console.log(editedPrice, itemDiscountPrice, "itemDiscountPrice")}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue