143: arp_util.debug('adjustment_generation: ' || 'x_msg_data : ' || x_msg_data);
144: END IF;
145:
146: IF (x_msg_count > 0) THEN
147: FND_MSG_PUB.Get(FND_MSG_PUB.G_FIRST,FND_API.G_TRUE,x_data,x_msgindex_out);
148: FND_MESSAGE.Set_Encoded(x_data);
149: app_exception.raise_exception;
150: ELSE
151: app_exception.raise_exception;
744: IF PG_DEBUG in ('Y', 'C') THEN
745: arp_util.debug('jl_ar_receivable_applications.Apply_br()+');
746: END IF;
747:
748: p_return_status := FND_API.G_RET_STS_SUCCESS;
749:
750: IF p_apply_before_after = 'BEFORE' THEN
751:
752: IF p_due_date < p_receipt_date THEN
1013: END IF;
1014:
1015: EXCEPTION
1016: WHEN validation_error THEN
1017: p_return_status := FND_API.G_RET_STS_ERROR;
1018:
1019: END Apply_br;
1020: PROCEDURE Unapply_br(
1021: p_cash_receipt_id IN VARCHAR2 ,
1039: IF PG_DEBUG in ('Y', 'C') THEN
1040: arp_util.debug('jl_ar_receivable_applications.Unapply_br()+');
1041: END IF;
1042:
1043: p_return_status := FND_API.G_RET_STS_SUCCESS;
1044:
1045: BEGIN
1046: SELECT apply_date
1047: INTO x_apply_date
1052: WHEN OTHERS THEN
1053: IF PG_DEBUG in ('Y', 'C') THEN
1054: arp_util.debug('Unapply_br: ' || to_char(SQLCODE));
1055: END IF;
1056: p_return_status := FND_API.G_RET_STS_ERROR;
1057: END;
1058:
1059: IF p_return_status = FND_API.G_RET_STS_SUCCESS THEN
1060:
1055: END IF;
1056: p_return_status := FND_API.G_RET_STS_ERROR;
1057: END;
1058:
1059: IF p_return_status = FND_API.G_RET_STS_SUCCESS THEN
1060:
1061: jl_zz_ar_library_1_pkg.get_prev_interest_values(p_applied_payment_schedule_id,
1062: p_cash_receipt_id,
1063: x_apply_date,
1099: l_ps_rec.global_attribute15 := x_writeoff_date;
1100: arp_ps_pkg.update_p(l_ps_rec, p_applied_payment_schedule_id);
1101:
1102: ELSE
1103: p_return_status := FND_API.G_RET_STS_ERROR;
1104: END IF;
1105:
1106: END IF;
1107:
1150:
1151: IF x_error_code = 0 then
1152:
1153: IF x_interest_reversal THEN
1154: p_return_status := FND_API.G_RET_STS_SUCCESS;
1155: OPEN pay_sched;
1156: IF PG_DEBUG in ('Y', 'C') THEN
1157: arp_util.debug('Reverse_br: ' || 'Cursor pay_sched +');
1158: END IF;
1204: l_ps_rec.global_attribute15 := x_writeoff_date;
1205: arp_ps_pkg.update_p(l_ps_rec, ps_rec.pay_sched_id);
1206:
1207: ELSE
1208: p_return_status := FND_API.G_RET_STS_ERROR;
1209: END IF;
1210:
1211: END IF;
1212:
1217: CLOSE pay_sched;
1218: ELSE
1219: FND_MESSAGE.SET_NAME('JL','JL_BR_AR_STD_REV');
1220: FND_MSG_PUB.Add;
1221: p_return_status := FND_API.G_RET_STS_ERROR;
1222: END IF;
1223: ELSE
1224: p_return_status := FND_API.G_RET_STS_ERROR;
1225: END IF;
1220: FND_MSG_PUB.Add;
1221: p_return_status := FND_API.G_RET_STS_ERROR;
1222: END IF;
1223: ELSE
1224: p_return_status := FND_API.G_RET_STS_ERROR;
1225: END IF;
1226:
1227: IF PG_DEBUG in ('Y', 'C') THEN
1228: arp_util.debug('jl_ar_receivable_applications.Reverse_br()-');
1285: l_country_code := JG_ZZ_SHARED_PKG.get_country(l_org_id,null);
1286:
1287: IF l_country_code IS NULL THEN
1288:
1289: p_return_status := FND_API.G_RET_STS_ERROR;
1290:
1291: ELSIF l_country_code = 'BR' THEN
1292:
1293: jg_zz_global_flex_vald_pkg.validate_global_attb_cat(
1335: ELSE
1336:
1337: FND_MESSAGE.SET_NAME('JG','JG_ZZ_INVALID_GLOBAL_ATTB_CAT');
1338: FND_MSG_PUB.Add;
1339: p_return_status := FND_API.G_RET_STS_ERROR;
1340:
1341: END IF;
1342: END IF;
1343:
1368:
1369: --l_country_code := FND_PROFILE.VALUE('JGZZ_COUNTRY_CODE');
1370:
1371: IF l_country_code IS NULL THEN
1372: p_return_status := FND_API.G_RET_STS_SUCCESS;
1373: ELSIF l_country_code = 'BR' THEN
1374: Unapply_br(
1375: p_cash_receipt_id,
1376: p_applied_payment_schedule_id,
1402: l_country_code := JG_ZZ_SHARED_PKG.get_country(l_org_id,null);
1403: --l_country_code := FND_PROFILE.VALUE('JGZZ_COUNTRY_CODE');
1404:
1405: IF l_country_code IS NULL THEN
1406: p_return_status := FND_API.G_RET_STS_SUCCESS;
1407: ELSIF l_country_code = 'BR' THEN
1408: Reverse_br(
1409: p_cash_receipt_id,
1410: p_return_status);
1507: --END IF;
1508:
1509: fnd_file.put_line(fnd_file.log,'Rec Appl Id :'||to_char(p_post_quickcash_req_id));
1510:
1511: x_return_status := FND_API.G_RET_STS_SUCCESS;
1512: For rint in c_int(p_post_quickcash_req_id)
1513: Loop
1514:
1515: fnd_file.put_line(fnd_file.log,'After opening the cursor()+');