Project

General

Profile

Tasks #12639

Cost Showing wrong - Sales report

Added by Rijas P about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Urgent
Assignee:
Start date:
12/12/2023
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

Dear Ijas,

If the Summary by is not "Invoice", the Cost in the Sales report is incorrect. I believe the cost of a voided customer shipment is also being calculated.

*Summary by Invoice - Correct*

*Summary by Customer*


Files

20231212-124835-261.png (123 KB) 20231212-124835-261.png Rijas P, 12/12/2023 02:18 PM
20231212-124941-965.png (87.6 KB) 20231212-124941-965.png Rijas P, 12/12/2023 02:19 PM

History

#1

Updated by Ijas Ahammed about 1 year ago

  • Assignee changed from Ijas Ahammed to Shemil Ali

Cost showing wrong when we take the sales report summary by Date. The issue got in 70. But unable to find the reason. Please assign.

#2

Updated by Mohamed Suhail about 1 year ago

  • Status changed from New to Resolved
  • Assignee changed from Shemil Ali to Rijas P
  • % Done changed from 0 to 100

Ijas Ahammed wrote:

Cost showing wrong when we take the sales report summary by Date. The issue got in 70. But unable to find the reason. Please assign.

I have made corrections on the transactions for shipments that were reversed, but the order is kept intact. There was a bug reported some time ago, and it has been fixed in the latest work deployed there.

euro=# select distinct m_inout_id,movementdate from (select mil.m_inoutline_id,mil.m_product_id,mcd.created,mcd.amt,mcd.qty,mi.m_inout_id,mi.movementdate from m_inoutline mil join m_inout mi on mil.m_inout_id=mi.m_inout_id join c_order co on co.c_order_id=mi.c_order_id join m_costdetail mcd on mcd.m_inoutline_id = mil.m_inoutline_id where mi.docstatus ='RE' and co.docstatus='CO' and mi.movementtype='C-' and mcd.qty > 0 and amt < 0 and mi.created > '2023-01-01' order by mcd.created desc) as aa order by 1;
m_inout_id | movementdate
------------+---------------------
1055501 | 2023-09-01 00:00:00
1055507 | 2023-09-01 00:00:00
1055509 | 2023-09-01 00:00:00
1055515 | 2023-09-02 00:00:00
1055539 | 2023-09-04 00:00:00
1055542 | 2023-09-04 00:00:00
1055566 | 2023-09-05 00:00:00
1055567 | 2023-09-05 00:00:00
1055587 | 2023-09-06 00:00:00
1057096 | 2023-11-03 00:00:00
1057104 | 2023-11-03 00:00:00
(11 rows)

euro=# update m_costdetail mcd set amt =mcd.amt*-1 from (select mil.m_inoutline_id,mil.m_product_id,mcd.created,mcd.amt,mcd.qty from m_inoutline mil join m_inout mi on mil.m_inout_id=mi.m_inout_id join c_order co on co.c_order_id=mi.c_order_id join m_costdetail mcd on mcd.m_inoutline_id = mil.m_inoutline_id where mi.docstatus ='RE' and co.docstatus='CO' and mi.movementtype='C-' and mcd.qty > 0 and amt < 0 and mi.m_inout_id in (1055501,1055507,1055509,1055515,1055539,1055542,1055566,1055567,1055587,1057096,1057104) order by mcd.created desc) as aa where aa.m_inoutline_id=mcd.m_inoutline_id;
UPDATE 589

Rijas P please check now

#3

Updated by Rijas P about 1 year ago

  • Status changed from Resolved to Closed

Found fixed

#4

Updated by SHAIJAL EDAVANA 8 months ago

  • Tracker changed from Bug to Tasks
  • Project changed from Euro Novelties to Temp Projects
  • Category deleted (Others)

Also available in: Atom PDF