Académique Documents
Professionnel Documents
Culture Documents
do_completion_checking
arxtwmai_folder7.complete_flag( event )
arp_trx_complete_chk.do_completion_checking
ARP_PROCESS_LINE.make_incomplete( p_customer_trx_id IN
ra_customer_trx.customer_trx_id%type )
make_incomplete( p_customer_trx_id IN
ra_customer_trx.customer_trx_id%type )
make_incomplete( p_customer_trx_id IN
ra_customer_trx.customer_trx_id%type )
ARP_TRX_COMPLETE_CHK.do_completion_checking(
p_customer_trx_id IN
ra_customer_trx.customer_trx_id%type,
p_so_source_code IN varchar2,
p_so_installed_flag IN varchar2,
p_error_count OUT NOCOPY number
);
arxtwmai_folder_db.lock_header('COMPLETE');
arp_trx_complete_chk.do_completion_checking(
art_context.pg_customer_trx_id,
oe_profile.value('OE_SOURCE_CODE'),
Name_In('ar_world.so_installed_flag'),
'STANDARD',
l_error_count,
'N' );
********************************************************************************
****
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
END IF;
/* Bug 2874057-4024598
We can complete a trx without saving it. We need to
generate a doc seq and update the table.
After that, if the "copy document to transaction number" flag is
checked
in batch source, then we need to query up this doc seq and then u
pdate
tgw_header.OLD_TRX_NUMBER and tgw_header.TRX_NUMBER. */
IF NAME_IN('AR_WORLD.ar_unique_seq_numbers') IN ('A','P')
AND NAME_IN('TGW_HEADER.DOC_SEQUENCE_VALUE') IS NULL
THEN
ar_common.debug('about to generate doc seq and update trx number.
...');
l_cust_trx_id := TO_NUMBER(NAME_IN('tgw_header.customer_trx_id'))
;
arxtwmai_db_insert.gt_doc_seq_table(l_cust_trx_id).cust_trx_id :=
l_cust_trx_id;
arxtwmai_docseq.generate_doc_number( l_cust_trx_id,
NAME_IN('tgw_header.ctt_type_nam
e'),
app_date.field_to_date('tgw_head
er.trx_date'),
l_doc_sequence_id ,
l_doc_sequence_value);
IF l_doc_sequence_value IS NOT NULL THEN
arxtwmai_docseq.pg_doc_seq_upd := 'Y';
COPY(l_doc_sequence_id, 'tgw_header.doc_sequence_id');
COPY(l_doc_sequence_value, 'tgw_header.doc_sequence_value');
arxtwmai_docseq.pg_doc_seq_upd := 'N';
ELSIF arxtwmai_docseq.pg_seq_num_profile = 'A' THEN
FND_MESSAGE.SET_NAME ('FND', 'UNIQUE-ALWAYS USED');
FND_MESSAGE.ERROR;
RAISE form_trigger_failure;
END IF;
arxtwmai_db_insert.gt_doc_seq_table.DELETE(l_cust_trx_id);
END IF;
/*shifted below document sequence generation code for bug 7031997*/
/* For globalization functionality */
app_globe.event('UPDATE-INV-BEFORE-COMP');
/* Document sequencing changes: copy document number to transaction
number if "copy document to transaction number" flag is checked
in batch source */
IF NVL(Name_In('TGW_HEADER.BS_COPY_DOC_NUMBER_FLAG'), 'N') = 'Y' AND
(Name_In('TGW_HEADER.DOC_SEQUENCE_VALUE') IS NOT NULL) AND
/* Bug-4162777 Commented the below condition
(Name_In('TGW_HEADER.OLD_TRX_NUMBER') IS NULL) THEN */
Name_In('TGW_HEADER.DOC_SEQUENCE_VALUE') <> Name_In('TGW_HEADER.T
RX_NUMBER') THEN
Copy( Name_In('TGW_HEADER.TRX_NUMBER'),
'TGW_HEADER.OLD_TRX_NUMBER');
Copy( Name_In('TGW_HEADER.DOC_SEQUENCE_VALUE'),
'TGW_HEADER.TRX_NUMBER');
SET_ITEM_PROPERTY( 'TGW_HEADER.TRX_NUMBER', ITEM_IS_VALID, PROP
ERTY_TRUE );
SET_ITEM_PROPERTY( 'TGW_HEADER.TRX_NUMBER_MIR', ITEM_IS_VALID,
PROPERTY_TRUE );
END IF;
********************************************************************************
*