2439: l_called_from := 'AUTORECAPI';
2440:
2441: AR_RECEIPT_API_PUB.unapply
2442: ( p_api_version => 1.0,
2443: p_init_msg_list => FND_API.G_TRUE,
2444: p_commit => FND_API.G_FALSE,
2445: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2446: x_return_status => ul_return_status,
2447: x_msg_count => ul_msg_count,
2440:
2441: AR_RECEIPT_API_PUB.unapply
2442: ( p_api_version => 1.0,
2443: p_init_msg_list => FND_API.G_TRUE,
2444: p_commit => FND_API.G_FALSE,
2445: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2446: x_return_status => ul_return_status,
2447: x_msg_count => ul_msg_count,
2448: x_msg_data => ul_msg_data,
2441: AR_RECEIPT_API_PUB.unapply
2442: ( p_api_version => 1.0,
2443: p_init_msg_list => FND_API.G_TRUE,
2444: p_commit => FND_API.G_FALSE,
2445: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2446: x_return_status => ul_return_status,
2447: x_msg_count => ul_msg_count,
2448: x_msg_data => ul_msg_data,
2449: p_cash_receipt_id => PS.cash_receipt_id,
2463: ELSIF ul_msg_count > 1 Then
2464: LOOP
2465: IF nvl(ul_count,0) < ul_msg_count THEN
2466: ul_count := nvl(ul_count,0) +1 ;
2467: ul_msg_data :=FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
2468:
2469: arp_debug.debug ( 'the number is ' || ul_count );
2470: arp_debug.debug ( 'the message data is ' || ul_msg_data );
2471: ELSE
2881: arp_debug.debug('Calling create_cash API ()+');
2882: END IF;
2883:
2884: AR_RECEIPT_API_PUB.create_cash (p_api_version => 1.0,
2885: p_init_msg_list => FND_API.G_TRUE,
2886: p_commit => FND_API.G_FALSE,
2887: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2888: x_return_status => p_return_status,
2889: x_msg_count => p_msg_count,
2882: END IF;
2883:
2884: AR_RECEIPT_API_PUB.create_cash (p_api_version => 1.0,
2885: p_init_msg_list => FND_API.G_TRUE,
2886: p_commit => FND_API.G_FALSE,
2887: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2888: x_return_status => p_return_status,
2889: x_msg_count => p_msg_count,
2890: x_msg_data => p_msg_data,
2883:
2884: AR_RECEIPT_API_PUB.create_cash (p_api_version => 1.0,
2885: p_init_msg_list => FND_API.G_TRUE,
2886: p_commit => FND_API.G_FALSE,
2887: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2888: x_return_status => p_return_status,
2889: x_msg_count => p_msg_count,
2890: x_msg_data => p_msg_data,
2891: p_currency_code => p_currency_code,
2916: arp_debug.debug('p_msg_count: '||p_msg_count);
2917: arp_debug.debug('p_msg_data: '||p_msg_data);
2918:
2919: IF p_msg_data IS NULL THEN
2920: p_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
2921: END IF;
2922:
2923: insert_exceptions( p_batch_id => p_batch_id,
2924: p_request_id => p_request_id,
2932: p_msg_data := NULL;
2933: LOOP
2934: IF nvl(l_count, 0) < p_msg_count THEN
2935: l_count := nvl(l_count,0) +1 ;
2936: l_msg_data :=FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
2937:
2938: arp_debug.debug ( 'the number is ' || l_count );
2939: arp_debug.debug ( 'the message data is ' || l_msg_data );
2940: IF length(p_msg_data||l_count||'.'||l_msg_data||' ') < 2000 THEN
2991: arp_debug.debug('p_batch_id '|| p_batch_id);
2992: END IF;
2993:
2994: AR_RECEIPT_API_PUB.apply ( p_api_version => 1.0,
2995: p_init_msg_list => FND_API.G_TRUE,
2996: p_commit => FND_API.G_FALSE,
2997: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2998: x_return_status => p_return_status,
2999: x_msg_count => l_msg_count,
2992: END IF;
2993:
2994: AR_RECEIPT_API_PUB.apply ( p_api_version => 1.0,
2995: p_init_msg_list => FND_API.G_TRUE,
2996: p_commit => FND_API.G_FALSE,
2997: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2998: x_return_status => p_return_status,
2999: x_msg_count => l_msg_count,
3000: x_msg_data => l_msg_data,
2993:
2994: AR_RECEIPT_API_PUB.apply ( p_api_version => 1.0,
2995: p_init_msg_list => FND_API.G_TRUE,
2996: p_commit => FND_API.G_FALSE,
2997: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
2998: x_return_status => p_return_status,
2999: x_msg_count => l_msg_count,
3000: x_msg_data => l_msg_data,
3001: p_cash_receipt_id => p_cash_receipt_id,
3031: l_msg_data := 'Application failure. You need to nullify the SELECTED FOR RECEIPT BATCH ID on the invoice'||
3032: ' when the invoice is fixed. Then apply the invoice manually to the receipt'||
3033: ' with receipt id: '||p_cash_receipt_id||', created by automatic receipts for that invoice';
3034: ELSE
3035: l_msg_data :=FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
3036: END IF;
3037: arp_debug.debug ( 'the number is ' || l_count );
3038: arp_debug.debug ( 'the message data is ' || l_msg_data );
3039:
3114:
3115: /*------------------------------------------------------+
3116: | Check the return status from Process_Payment |
3117: +------------------------------------------------------*/
3118: IF p_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3119:
3120: IF l_msg_count = 1 Then
3121: arp_debug.debug('l_msg_data '||l_msg_data);
3122:
3133:
3134: LOOP
3135: IF nvl(l_count,0) < l_msg_count THEN
3136: l_count := nvl(l_count,0) +1 ;
3137: l_msg_data :=FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
3138:
3139: arp_debug.debug ( 'the number is ' || l_count );
3140: arp_debug.debug ( 'the message data is ' || l_msg_data );
3141:
4618:
4619: /*------------------------------------------------------+
4620: | Check the return status from Process_Payment |
4621: +------------------------------------------------------*/
4622: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4623: l_pay_process_fail := 'Y';
4624:
4625: l_err_rcpt_index := l_err_rcpt_index + 1;
4626: l_err_rcpt_num_array( l_err_rcpt_index ) := l_receipt_num_array(i);
4729: arp_debug.debug( 'Returning from process_payments ');
4730: arp_debug.debug( 'l_return_status = '|| l_return_status);
4731: END IF;
4732:
4733: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4734: l_pay_process_fail := 'Y';
4735:
4736: UPDATE ra_customer_trx
4737: SET cc_error_flag = 'Y',