Project

General

Profile

Production Ticket(ST) #11773

KYMMSENG - check this good return error

Added by Rashdan Hussin 4 months ago. Updated 4 months ago.

Status:
Ticket Resolved
Priority:
P3 - Medium
Start date:
22/05/2024
Due date:
24/05/2024
% Done:

100%

Estimated time:
Spent time:
Job Remark:
Ticket Logged Date:
22/05/2024
Ticket No.:
Related Ticket ID:
Type:
Support Request
SLA Initial Response:
22/05/2024
SLA Delivery:
24/05/2024
Esclation Time:
Issue Reoccurance#:
Actual Initial Response:
22/05/2024
Resolution:

1) Simulate this issue in server to identify the error. Key duplicate.
2) Run the profiler to know the sp.
3) Try run the script one by one to identify the duplication.
4) Delete the customer branch duplication.

Root cause: Customer branch duplicate.

Requester ExpectedDeliveryDate:
Delay Justification:
Priority Seq:
Effort (Hour):
External Ticket #:

None


Description

@Cris Neoh MCC pls help me check this good return error
@Rashdan Hussin this is the return number, L1 should ask user if only 1 transaction or every return also hit error
I called user she said she done first and 2nd no issue
This 3rd hit error


History

#1 Updated by Rashdan Hussin 4 months ago

  • Status changed from Assigned To to Support In Progress

#2 Updated by Rashdan Hussin 4 months ago

select * from txn_return_details x
left join txn_return_header h on x.return_id = h.return_id
left join product_item p on p.item_id = x.item_id
left join mst_product_uom uom1 on x.uom1_id = uom1.product_uom_id
left join mst_product_uom uom2 on x.uom2_id = uom2.product_uom_id
left join mst_product_uom uom3 on x.uom3_id = uom3.product_uom_id
left join warehouse w on w.warehouse_id = x.warehouse_id
left join mst_condition cc on cc.condition_id = x.condition
left join mst_reason_list r on r.id = x.reason_id
left join (
select pc.* from mst_product_price pc
inner join customer c on c.price_id = pc.price_code_id and pc.status='Active'
and c.customer_id='9662140a-43b6-4444-97de-22f8b2decdd5'
) pc on p.item_id=pc.item_id
----left join (
---- select hh.invoice_no, dd.item_id, sum(dd.return_qty_balance) as return_qty_balance from txn_invoice_history_header hh
---- inner join txn_invoice_history_detail dd on dd.invoice_id = hh.invoice_id
---- group by hh.invoice_no, dd.item_id
----) hh on hh.invoice_no = x.invoice_no
----and hh.item_id = x.item_id
left join mst_product_class mpc on mpc.product_class_id = p.product_class_id
left join product_sub_group sg on p.sub_group_id = sg.sub_group_id
left join product_group g on sg.group_id = g.group_id
left join mst_package_group mpg on mpg.package_group_id = p.package_group_id
Left join (
Select w.warehouse_id, w.warehouse_code, w.warehouse_desc, w.warehouse_stock_type from warehouse w
inner join warehouse_branch wb on wb.warehouse_id = w.warehouse_id
inner join mst_customer_branch cb on cb.branch_id = wb.branch_id
where w.org_id = 'kymmseng' and cb.customer_id = '9662140a-43b6-4444-97de-22f8b2decdd5' and is_default = 1
) defaultWarehouse on defaultWarehouse.warehouse_stock_type = cc.condition_code
where x.return_id = '3c5db4c7-9d14-4e2d-9565-ffdcde5e57e1' and x.tenant_id = 'suntory'

--select * from mst_customer_branch where customer_id = '9662140a-43b6-4444-97de-22f8b2decdd5'

--select * into DMS_Ecosystem_Suntory_Backup_Table.dbo._mst_customer_branch_20240523
--from DMS_EcoSystem_Suntory.dbo.mst_customer_branch

--delete from mst_customer_branch where customer_branch_id = '4792356C700441CD823329A3F14D8036'

#3 Updated by Rashdan Hussin 4 months ago

  • Status changed from Pending Client Verification to Ticket Resolved
  • % Done changed from 90 to 100

Also available in: Atom PDF