707: CE_AUTO_BANK_REC.G_receivables_trx_id);
708:
709: cep_standard.debug( 'x_receivables_trx_id= '|| x_receivables_trx_id);
710:
711: -- bug 5722367 removed the reference to ar_receivables_trx_all table to ar_receivables_trx
712: if (x_receivables_trx_id is not null) THEN
713: select org_id
714: into X_ORG_ID
715: from AR_RECEIVABLES_TRX
711: -- bug 5722367 removed the reference to ar_receivables_trx_all table to ar_receivables_trx
712: if (x_receivables_trx_id is not null) THEN
713: select org_id
714: into X_ORG_ID
715: from AR_RECEIVABLES_TRX
716: where RECEIVABLES_TRX_ID = x_receivables_trx_id;
717:
718: cep_standard.debug( 'x_ORG_ID= '|| X_ORG_ID);
719:
7273: l_vat_tax_id OUT NOCOPY NUMBER,
7274: X_tax_rate OUT NOCOPY NUMBER) IS
7275:
7276: -- l_vat_tax_id NUMBER;
7277: y_dr_vat_tax_code AR_RECEIVABLES_TRX.liability_tax_code%type;
7278: y_cr_vat_tax_code AR_RECEIVABLES_TRX.asset_tax_code%type;
7279:
7280: -- bug 5733971
7281: l_return_status VARCHAR2(50);
7274: X_tax_rate OUT NOCOPY NUMBER) IS
7275:
7276: -- l_vat_tax_id NUMBER;
7277: y_dr_vat_tax_code AR_RECEIVABLES_TRX.liability_tax_code%type;
7278: y_cr_vat_tax_code AR_RECEIVABLES_TRX.asset_tax_code%type;
7279:
7280: -- bug 5733971
7281: l_return_status VARCHAR2(50);
7282: l_msg_count NUMBER;
7290: ',CE_AUTO_BANK_MATCH.trx_org_id='||CE_AUTO_BANK_MATCH.trx_org_id );
7291: if (X_pass_mode = 'AUTO_TRX') then
7292: SELECT ar.liability_tax_code, ar.asset_tax_code
7293: INTO y_dr_vat_tax_code, y_cr_vat_tax_code
7294: FROM ar_receivables_trx ar
7295: WHERE ar.receivables_trx_id = CE_AUTO_BANK_MATCH.csl_receivables_trx_id
7296: AND ar.org_id = nvl(CE_AUTO_BANK_MATCH.trx_org_id,CE_AUTO_BANK_REC.G_org_id) ; --CE_AUTO_BANK_MATCH.bau_org_id;
7297: else
7298: y_dr_vat_tax_code := CE_AUTO_BANK_REC.G_dr_vat_tax_code;
7291: if (X_pass_mode = 'AUTO_TRX') then
7292: SELECT ar.liability_tax_code, ar.asset_tax_code
7293: INTO y_dr_vat_tax_code, y_cr_vat_tax_code
7294: FROM ar_receivables_trx ar
7295: WHERE ar.receivables_trx_id = CE_AUTO_BANK_MATCH.csl_receivables_trx_id
7296: AND ar.org_id = nvl(CE_AUTO_BANK_MATCH.trx_org_id,CE_AUTO_BANK_REC.G_org_id) ; --CE_AUTO_BANK_MATCH.bau_org_id;
7297: else
7298: y_dr_vat_tax_code := CE_AUTO_BANK_REC.G_dr_vat_tax_code;
7299: y_cr_vat_tax_code := CE_AUTO_BANK_REC.G_cr_vat_tax_code;