Project

General

Profile

Tasks #4010

Sales order print wrong from New Org [Party Point]

Added by Rijas P over 3 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Start date:
08/15/2021
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

While completing Sales order from Party Point organization. Each item listing 3 times in Sales order Printout. PFA


Files

POSOrder_15082021_2-4.pdf (1.94 KB) POSOrder_15082021_2-4.pdf Rijas P, 08/15/2021 07:34 PM

History

#1

Updated by Mohamed Suhail over 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Rijas P wrote:

While completing Sales order from Party Point organization. Each item listing 3 times in Sales order Printout. PFA

The org bpartner of the new org was having 3 bpartner locations

which is causing an issue with join in c_order_header_v

LEFT JOIN
(c_bpartner JOIN c_bpartner_location ON c_bpartner.c_bpartner_id = c_bpartner_location.c_bpartner_id)
orgbp(c_bpartner_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, value, name, name2, description, issummary, c_bp_group_id, isonetime, isprospect, isvendor, iscustomer, isemployee, issalesrep, referenceno, duns, url, ad_language, taxid, istaxexempt, c_invoiceschedule_id, rating, salesvolume, numberemployees, naics, firstsale, acqusitioncost, potentiallifetimevalue, actuallifetimevalue, shareofcustomer, paymentrule, so_creditlimit, so_creditused, c_paymentterm_id, m_pricelist_id, m_discountschema_id, c_dunning_id, isdiscountprinted, so_description, poreference, paymentrulepo, po_pricelist_id, po_discountschema_id, po_paymentterm_id, documentcopies, c_greeting_id, invoicerule, deliveryrule, freightcostrule, deliveryviarule, salesrep_id, sendemail, bpartner_parent_id, invoice_printformat_id, socreditstatus, shelflifeminpct, ad_orgbp_id, flatdiscount, totalopenbalance, dunninggrace, c_taxgroup_id, logo_id, ispotaxexempt, ismanufacturer, c_currency_id, taxid1, comments, loyaltyno, cstno, panno, c_bpartner_loyalty_id, anniversary, isconsignee, gracedays, service_tax_no, trade_license_no, cin, sst_no, isproductionsupervisor, email, birthday, extradetails, gender, bpartnertype, graceamt, invoice_doctype_id, c_bpartner_location_id, ad_client_id_1, ad_org_id_1, isactive_1, created_1, createdby_1, updated_1, updatedby_1, name_1, isbillto, isshipto, ispayfrom, isremitto, phone, phone2, fax, isdn, c_salesregion_id, c_bpartner_id_1, c_location_id, sequence)
ON orgbp.ad_orgbp_id = o.ad_org_id

(one fix it is to change the join in view as below

LEFT JOIN
(c_bpartner JOIN c_bpartner_location ON c_bpartner.c_bpartner_id = c_bpartner_location.c_bpartner_id *and c_bpartner_location.isbillto='Y'*)
)

I created a new customer called "Org3 Bpartner" and made it as the org bpartner of the branch

Before

euro=# select name,ad_org_id,ad_orgbp_id,c_bpartner_id from c_bpartner where ad_orgbp_id is not null and ad_client_id=1000000;;
name | ad_org_id | ad_orgbp_id | c_bpartner_id
----------------------------------+-----------+-------------+---------------
Euro Novelties LLc | 1000000 | 1000000 | 1000002
Van Sales | 1000001 | 1000001 | 1000201
Party Point - Euro Novelties LLC | 1000002 | 1000002 | 1000341
(3 rows)

Update scripts

euro=# update c_bpartner set ad_orgbp_id =NULL where c_bpartner_id=1000341;
UPDATE 1
euro=# update c_bpartner set ad_orgbp_id =1000002 where c_bpartner_id=1011377;
UPDATE 1

After

euro=# select name,ad_org_id,ad_orgbp_id,c_bpartner_id from c_bpartner where ad_orgbp_id is not null and ad_client_id=1000000;;
name | ad_org_id | ad_orgbp_id | c_bpartner_id
--------------------+-----------+-------------+---------------
Euro Novelties LLc | 1000000 | 1000000 | 1000002
Van Sales | 1000001 | 1000001 | 1000201
Org3 Bpartner | 1000002 | 1000002 | 1011377
(3 rows)

#2

Updated by Noufal K over 3 years ago

corrected the view. Please rerun sql 1439...sql

#3

Updated by Noufal K over 3 years ago

  • Status changed from Resolved to Closed
#4

Updated by SHAIJAL EDAVANA 9 months ago

  • Assignee set to Shemil Ali
#5

Updated by SHAIJAL EDAVANA 8 months ago

  • Tracker changed from Bug to Tasks
  • Project changed from Euro Novelties to Temp Projects

Also available in: Atom PDF