89: commit;
90: end if;
91: exception
92: when others then
93: FND_FILE.PUT_LINE(fnd_file.log,'Error occured while deleting exisiting rows in
94: PAY_IE_TAX_ERROR table');
95: end;
96:
97: UPDATE PAY_IE_TAX_BODY_INTERFACE
130: AND BodyRec.sum_mth_tax_credit = TrailRec.total_mth_credit
131: AND BodyRec.sum_wk_tax_credit = TrailRec.total_wk_credit)
132: THEN
133: retcode := 0;
134: fnd_file.put_line( fnd_file.log, 'FND - CONC-COMPLETION TEXT:NORMAL');
135:
136: update pay_ie_tax_body_interface
137: set process_flag = 'Y'
138: where EMPLOYER_NUMBER = p_employer_number;
148: EXCEPTION
149: WHEN NO_DATA_FOUND THEN
150: l_error := SQLERRM;
151: retcode := 2;
152: FND_FILE.PUT_LINE(fnd_file.log,'No data found');
153: WHEN unequal_value THEN
154: errbuf := fnd_message.get;
155: l_error_stack := errbuf;
156: l_error := SQLERRM;
155: l_error_stack := errbuf;
156: l_error := SQLERRM;
157: retcode := 2;
158: IF l_count_mth_taxcredit <> l_count_emp_recno THEN
159: FND_FILE.NEW_LINE(fnd_file.log, 1);
160: FND_FILE.PUT_LINE(fnd_file.log,
161: 'The total number of record in pay_ie_tax_body_interface is '
162: || TO_CHAR (l_count_mth_taxcredit));
163: FND_FILE.PUT_LINE (fnd_file.log,
156: l_error := SQLERRM;
157: retcode := 2;
158: IF l_count_mth_taxcredit <> l_count_emp_recno THEN
159: FND_FILE.NEW_LINE(fnd_file.log, 1);
160: FND_FILE.PUT_LINE(fnd_file.log,
161: 'The total number of record in pay_ie_tax_body_interface is '
162: || TO_CHAR (l_count_mth_taxcredit));
163: FND_FILE.PUT_LINE (fnd_file.log,
164: 'The value in pay_ie_tax_trailer_interface.record_no is '
159: FND_FILE.NEW_LINE(fnd_file.log, 1);
160: FND_FILE.PUT_LINE(fnd_file.log,
161: 'The total number of record in pay_ie_tax_body_interface is '
162: || TO_CHAR (l_count_mth_taxcredit));
163: FND_FILE.PUT_LINE (fnd_file.log,
164: 'The value in pay_ie_tax_trailer_interface.record_no is '
165: || TO_CHAR(l_count_emp_recno));
166: FND_FILE.PUT_LINE(fnd_file.log,
167: 'Error - Retcode = 2, total number of record in pay_ie_tax_body_interface');
162: || TO_CHAR (l_count_mth_taxcredit));
163: FND_FILE.PUT_LINE (fnd_file.log,
164: 'The value in pay_ie_tax_trailer_interface.record_no is '
165: || TO_CHAR(l_count_emp_recno));
166: FND_FILE.PUT_LINE(fnd_file.log,
167: 'Error - Retcode = 2, total number of record in pay_ie_tax_body_interface');
168: FND_FILE.PUT_LINE(fnd_file.log,
169: 'does not match the value in pay_ie_tax_trailer_interface.record_no');
170: END IF;
164: 'The value in pay_ie_tax_trailer_interface.record_no is '
165: || TO_CHAR(l_count_emp_recno));
166: FND_FILE.PUT_LINE(fnd_file.log,
167: 'Error - Retcode = 2, total number of record in pay_ie_tax_body_interface');
168: FND_FILE.PUT_LINE(fnd_file.log,
169: 'does not match the value in pay_ie_tax_trailer_interface.record_no');
170: END IF;
171:
172: IF l_sum_mth_rate_cutoff <> l_total_mth_cutoff THEN
169: 'does not match the value in pay_ie_tax_trailer_interface.record_no');
170: END IF;
171:
172: IF l_sum_mth_rate_cutoff <> l_total_mth_cutoff THEN
173: FND_FILE.NEW_LINE(fnd_file.log, 1);
174: FND_FILE.PUT_LINE(fnd_file.log,
175: 'The sum of pay_ie_tax_body_interface.mth_rate_cutoff is '
176: || TO_CHAR (l_sum_mth_rate_cutoff));
177: FND_FILE.PUT_LINE (fnd_file.log,
170: END IF;
171:
172: IF l_sum_mth_rate_cutoff <> l_total_mth_cutoff THEN
173: FND_FILE.NEW_LINE(fnd_file.log, 1);
174: FND_FILE.PUT_LINE(fnd_file.log,
175: 'The sum of pay_ie_tax_body_interface.mth_rate_cutoff is '
176: || TO_CHAR (l_sum_mth_rate_cutoff));
177: FND_FILE.PUT_LINE (fnd_file.log,
178: 'The total monthly cutoff in pay_ie_tax_trailer_interface.total_mth_rate_cutoff is '
173: FND_FILE.NEW_LINE(fnd_file.log, 1);
174: FND_FILE.PUT_LINE(fnd_file.log,
175: 'The sum of pay_ie_tax_body_interface.mth_rate_cutoff is '
176: || TO_CHAR (l_sum_mth_rate_cutoff));
177: FND_FILE.PUT_LINE (fnd_file.log,
178: 'The total monthly cutoff in pay_ie_tax_trailer_interface.total_mth_rate_cutoff is '
179: || TO_CHAR(l_total_mth_cutoff));
180: FND_FILE.PUT_LINE(fnd_file.log,
181: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.mth_rate_cutoff');
176: || TO_CHAR (l_sum_mth_rate_cutoff));
177: FND_FILE.PUT_LINE (fnd_file.log,
178: 'The total monthly cutoff in pay_ie_tax_trailer_interface.total_mth_rate_cutoff is '
179: || TO_CHAR(l_total_mth_cutoff));
180: FND_FILE.PUT_LINE(fnd_file.log,
181: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.mth_rate_cutoff');
182: FND_FILE.PUT_LINE(fnd_file.log,
183: 'does not match the total monthly cutoff in pay_ie_tax_trailer_interface.total_mth_rate_cutoff');
184: END IF;
178: 'The total monthly cutoff in pay_ie_tax_trailer_interface.total_mth_rate_cutoff is '
179: || TO_CHAR(l_total_mth_cutoff));
180: FND_FILE.PUT_LINE(fnd_file.log,
181: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.mth_rate_cutoff');
182: FND_FILE.PUT_LINE(fnd_file.log,
183: 'does not match the total monthly cutoff in pay_ie_tax_trailer_interface.total_mth_rate_cutoff');
184: END IF;
185: IF l_sum_wk_rate_cutoff <> l_total_wk_cutoff THEN
186: FND_FILE.NEW_LINE(fnd_file.log, 1);
182: FND_FILE.PUT_LINE(fnd_file.log,
183: 'does not match the total monthly cutoff in pay_ie_tax_trailer_interface.total_mth_rate_cutoff');
184: END IF;
185: IF l_sum_wk_rate_cutoff <> l_total_wk_cutoff THEN
186: FND_FILE.NEW_LINE(fnd_file.log, 1);
187: FND_FILE.PUT_LINE(fnd_file.log,
188: 'The sum of pay_ie_tax_body_interface.wk_rate_cutoff is '
189: || TO_CHAR(l_sum_wk_rate_cutoff));
190: FND_FILE.PUT_LINE(fnd_file.log,
183: 'does not match the total monthly cutoff in pay_ie_tax_trailer_interface.total_mth_rate_cutoff');
184: END IF;
185: IF l_sum_wk_rate_cutoff <> l_total_wk_cutoff THEN
186: FND_FILE.NEW_LINE(fnd_file.log, 1);
187: FND_FILE.PUT_LINE(fnd_file.log,
188: 'The sum of pay_ie_tax_body_interface.wk_rate_cutoff is '
189: || TO_CHAR(l_sum_wk_rate_cutoff));
190: FND_FILE.PUT_LINE(fnd_file.log,
191: 'The total weekly cutoff in pay_ie_tax_trailer_interface.total_wk_rate_cutoff is '
186: FND_FILE.NEW_LINE(fnd_file.log, 1);
187: FND_FILE.PUT_LINE(fnd_file.log,
188: 'The sum of pay_ie_tax_body_interface.wk_rate_cutoff is '
189: || TO_CHAR(l_sum_wk_rate_cutoff));
190: FND_FILE.PUT_LINE(fnd_file.log,
191: 'The total weekly cutoff in pay_ie_tax_trailer_interface.total_wk_rate_cutoff is '
192: || TO_CHAR(l_total_wk_cutoff));
193: FND_FILE.PUT_LINE(fnd_file.log,
194: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.wk_rate_cutoff');
189: || TO_CHAR(l_sum_wk_rate_cutoff));
190: FND_FILE.PUT_LINE(fnd_file.log,
191: 'The total weekly cutoff in pay_ie_tax_trailer_interface.total_wk_rate_cutoff is '
192: || TO_CHAR(l_total_wk_cutoff));
193: FND_FILE.PUT_LINE(fnd_file.log,
194: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.wk_rate_cutoff');
195: FND_FILE.PUT_LINE(fnd_file.log,
196: 'does not match the the total weekly cutoff in pay_ie_tax_trailer_interface.total_wk_rate_cutoff');
197: END IF;
191: 'The total weekly cutoff in pay_ie_tax_trailer_interface.total_wk_rate_cutoff is '
192: || TO_CHAR(l_total_wk_cutoff));
193: FND_FILE.PUT_LINE(fnd_file.log,
194: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.wk_rate_cutoff');
195: FND_FILE.PUT_LINE(fnd_file.log,
196: 'does not match the the total weekly cutoff in pay_ie_tax_trailer_interface.total_wk_rate_cutoff');
197: END IF;
198: IF l_sum_mth_tax_credit <> l_total_mth_credit THEN
199: FND_FILE.NEW_LINE(fnd_file.log, 1);
195: FND_FILE.PUT_LINE(fnd_file.log,
196: 'does not match the the total weekly cutoff in pay_ie_tax_trailer_interface.total_wk_rate_cutoff');
197: END IF;
198: IF l_sum_mth_tax_credit <> l_total_mth_credit THEN
199: FND_FILE.NEW_LINE(fnd_file.log, 1);
200: FND_FILE.PUT_LINE(fnd_file.log,
201: 'The sum of pay_ie_tax_body_interface.mth_tax_credit is '
202: || TO_CHAR(l_sum_mth_tax_credit));
203: FND_FILE.PUT_LINE(fnd_file.log,
196: 'does not match the the total weekly cutoff in pay_ie_tax_trailer_interface.total_wk_rate_cutoff');
197: END IF;
198: IF l_sum_mth_tax_credit <> l_total_mth_credit THEN
199: FND_FILE.NEW_LINE(fnd_file.log, 1);
200: FND_FILE.PUT_LINE(fnd_file.log,
201: 'The sum of pay_ie_tax_body_interface.mth_tax_credit is '
202: || TO_CHAR(l_sum_mth_tax_credit));
203: FND_FILE.PUT_LINE(fnd_file.log,
204: 'The total monthly credit in pay_ie_tax_trailer_interface.total_mth_tax_credit is '
199: FND_FILE.NEW_LINE(fnd_file.log, 1);
200: FND_FILE.PUT_LINE(fnd_file.log,
201: 'The sum of pay_ie_tax_body_interface.mth_tax_credit is '
202: || TO_CHAR(l_sum_mth_tax_credit));
203: FND_FILE.PUT_LINE(fnd_file.log,
204: 'The total monthly credit in pay_ie_tax_trailer_interface.total_mth_tax_credit is '
205: || TO_CHAR(l_total_mth_credit));
206: FND_FILE.PUT_LINE(fnd_file.log,
207: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.mth_tax_credit');
202: || TO_CHAR(l_sum_mth_tax_credit));
203: FND_FILE.PUT_LINE(fnd_file.log,
204: 'The total monthly credit in pay_ie_tax_trailer_interface.total_mth_tax_credit is '
205: || TO_CHAR(l_total_mth_credit));
206: FND_FILE.PUT_LINE(fnd_file.log,
207: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.mth_tax_credit');
208: FND_FILE.PUT_LINE(fnd_file.log,
209: 'does not match the total monthly credit in pay_ie_tax_trailer_interface.total_mth_tax_credit');
210: END IF;
204: 'The total monthly credit in pay_ie_tax_trailer_interface.total_mth_tax_credit is '
205: || TO_CHAR(l_total_mth_credit));
206: FND_FILE.PUT_LINE(fnd_file.log,
207: 'Error - Retcode = 2, the sum of pay_ie_tax_body_interface.mth_tax_credit');
208: FND_FILE.PUT_LINE(fnd_file.log,
209: 'does not match the total monthly credit in pay_ie_tax_trailer_interface.total_mth_tax_credit');
210: END IF;
211: IF BodyRec.sum_wk_tax_credit <> TrailRec.total_wk_credit THEN
212: FND_FILE.NEW_LINE(fnd_file.log, 1);
208: FND_FILE.PUT_LINE(fnd_file.log,
209: 'does not match the total monthly credit in pay_ie_tax_trailer_interface.total_mth_tax_credit');
210: END IF;
211: IF BodyRec.sum_wk_tax_credit <> TrailRec.total_wk_credit THEN
212: FND_FILE.NEW_LINE(fnd_file.log, 1);
213: FND_FILE.PUT_LINE(fnd_file.log,
214: 'The sum of pay_ie_tax_body_interface.wk_tax_credit is '
215: || TO_CHAR(l_sum_wk_tax_credit));
216: FND_FILE.PUT_LINE(fnd_file.log,
209: 'does not match the total monthly credit in pay_ie_tax_trailer_interface.total_mth_tax_credit');
210: END IF;
211: IF BodyRec.sum_wk_tax_credit <> TrailRec.total_wk_credit THEN
212: FND_FILE.NEW_LINE(fnd_file.log, 1);
213: FND_FILE.PUT_LINE(fnd_file.log,
214: 'The sum of pay_ie_tax_body_interface.wk_tax_credit is '
215: || TO_CHAR(l_sum_wk_tax_credit));
216: FND_FILE.PUT_LINE(fnd_file.log,
217: 'The total weekly credit in pay_ie_tax_trailer_interface.total_wk_tax_credit is '
212: FND_FILE.NEW_LINE(fnd_file.log, 1);
213: FND_FILE.PUT_LINE(fnd_file.log,
214: 'The sum of pay_ie_tax_body_interface.wk_tax_credit is '
215: || TO_CHAR(l_sum_wk_tax_credit));
216: FND_FILE.PUT_LINE(fnd_file.log,
217: 'The total weekly credit in pay_ie_tax_trailer_interface.total_wk_tax_credit is '
218: || TO_CHAR(l_total_wk_credit));
219: FND_FILE.PUT_LINE(fnd_file.log,
220: 'Error - Retcode = 2 because the sum of pay_ie_tax_body_interface.wk_tax_credit');
215: || TO_CHAR(l_sum_wk_tax_credit));
216: FND_FILE.PUT_LINE(fnd_file.log,
217: 'The total weekly credit in pay_ie_tax_trailer_interface.total_wk_tax_credit is '
218: || TO_CHAR(l_total_wk_credit));
219: FND_FILE.PUT_LINE(fnd_file.log,
220: 'Error - Retcode = 2 because the sum of pay_ie_tax_body_interface.wk_tax_credit');
221: FND_FILE.PUT_LINE(fnd_file.log,
222: 'does not match the total weekly credit in pay_ie_tax_trailer_interface.total_wk_tax_credit');
223: END IF;
217: 'The total weekly credit in pay_ie_tax_trailer_interface.total_wk_tax_credit is '
218: || TO_CHAR(l_total_wk_credit));
219: FND_FILE.PUT_LINE(fnd_file.log,
220: 'Error - Retcode = 2 because the sum of pay_ie_tax_body_interface.wk_tax_credit');
221: FND_FILE.PUT_LINE(fnd_file.log,
222: 'does not match the total weekly credit in pay_ie_tax_trailer_interface.total_wk_tax_credit');
223: END IF;
224:
225: INSERT INTO pay_ie_tax_error ( pps_number
244: errbuf := fnd_message.get;
245: l_error_stack := errbuf;
246: l_error := SQLERRM;
247: retcode := 2;
248: FND_FILE.PUT_LINE (fnd_file.log, 'Error raised in loading data into one or all of the follo
249: wing tables: pay_ie_tax_header_interface, pay_ie_tax_body_interface, pay_ie_tax_trailer_interface');
250:
251: INSERT INTO pay_ie_tax_error ( pps_number
252: , employee_number
624: l_request_id := FND_GLOBAL.CONC_REQUEST_ID;
625: retcode := 1;
626: -- Bug 5724436, the audit report will be called only in mode="Validate"
627: IF p_validate_mode <> 'IE_VALIDATE' THEN
628: fnd_file.put_line(fnd_file.output,lpad('PPS Number',11, ' ')||lpad('Works Number',15,' ')||lpad('Status',30,' ')); --4878630
629: fnd_file.put_line(fnd_file.output,lpad('----------',11, ' ')||lpad('------------',15,' ')||lpad('------',30,' '));
630: ELSE
631: -- bug 5724436
632: -- This is called only once to set the report fields.
625: retcode := 1;
626: -- Bug 5724436, the audit report will be called only in mode="Validate"
627: IF p_validate_mode <> 'IE_VALIDATE' THEN
628: fnd_file.put_line(fnd_file.output,lpad('PPS Number',11, ' ')||lpad('Works Number',15,' ')||lpad('Status',30,' ')); --4878630
629: fnd_file.put_line(fnd_file.output,lpad('----------',11, ' ')||lpad('------------',15,' ')||lpad('------',30,' '));
630: ELSE
631: -- bug 5724436
632: -- This is called only once to set the report fields.
633: fnd_file.put_line(fnd_file.output,'Index');
629: fnd_file.put_line(fnd_file.output,lpad('----------',11, ' ')||lpad('------------',15,' ')||lpad('------',30,' '));
630: ELSE
631: -- bug 5724436
632: -- This is called only once to set the report fields.
633: fnd_file.put_line(fnd_file.output,'Index');
634: fnd_file.put_line(fnd_file.output,'I :- Week1/Month1 Indicator');
635: fnd_file.put_line(fnd_file.output,'F :- Exemption Flag');
636: fnd_file.put_line(fnd_file.output,'Tax1 :- Standard Rate of Tax');
637: fnd_file.put_line(fnd_file.output,'Tax2 :- Higher Rate of Tax');
630: ELSE
631: -- bug 5724436
632: -- This is called only once to set the report fields.
633: fnd_file.put_line(fnd_file.output,'Index');
634: fnd_file.put_line(fnd_file.output,'I :- Week1/Month1 Indicator');
635: fnd_file.put_line(fnd_file.output,'F :- Exemption Flag');
636: fnd_file.put_line(fnd_file.output,'Tax1 :- Standard Rate of Tax');
637: fnd_file.put_line(fnd_file.output,'Tax2 :- Higher Rate of Tax');
638: fnd_file.put_line(fnd_file.output,' ');
631: -- bug 5724436
632: -- This is called only once to set the report fields.
633: fnd_file.put_line(fnd_file.output,'Index');
634: fnd_file.put_line(fnd_file.output,'I :- Week1/Month1 Indicator');
635: fnd_file.put_line(fnd_file.output,'F :- Exemption Flag');
636: fnd_file.put_line(fnd_file.output,'Tax1 :- Standard Rate of Tax');
637: fnd_file.put_line(fnd_file.output,'Tax2 :- Higher Rate of Tax');
638: fnd_file.put_line(fnd_file.output,' ');
639:
632: -- This is called only once to set the report fields.
633: fnd_file.put_line(fnd_file.output,'Index');
634: fnd_file.put_line(fnd_file.output,'I :- Week1/Month1 Indicator');
635: fnd_file.put_line(fnd_file.output,'F :- Exemption Flag');
636: fnd_file.put_line(fnd_file.output,'Tax1 :- Standard Rate of Tax');
637: fnd_file.put_line(fnd_file.output,'Tax2 :- Higher Rate of Tax');
638: fnd_file.put_line(fnd_file.output,' ');
639:
640: fnd_file.put_line(fnd_file.output,lpad('PAYE Details in Oracle Payroll',70,' ')||lpad('PAYE Details from Revenue',105,' '));
633: fnd_file.put_line(fnd_file.output,'Index');
634: fnd_file.put_line(fnd_file.output,'I :- Week1/Month1 Indicator');
635: fnd_file.put_line(fnd_file.output,'F :- Exemption Flag');
636: fnd_file.put_line(fnd_file.output,'Tax1 :- Standard Rate of Tax');
637: fnd_file.put_line(fnd_file.output,'Tax2 :- Higher Rate of Tax');
638: fnd_file.put_line(fnd_file.output,' ');
639:
640: fnd_file.put_line(fnd_file.output,lpad('PAYE Details in Oracle Payroll',70,' ')||lpad('PAYE Details from Revenue',105,' '));
641: fnd_file.put_line(fnd_file.output,lpad('==============================',70,' ')||lpad('=========================',105,' '));
634: fnd_file.put_line(fnd_file.output,'I :- Week1/Month1 Indicator');
635: fnd_file.put_line(fnd_file.output,'F :- Exemption Flag');
636: fnd_file.put_line(fnd_file.output,'Tax1 :- Standard Rate of Tax');
637: fnd_file.put_line(fnd_file.output,'Tax2 :- Higher Rate of Tax');
638: fnd_file.put_line(fnd_file.output,' ');
639:
640: fnd_file.put_line(fnd_file.output,lpad('PAYE Details in Oracle Payroll',70,' ')||lpad('PAYE Details from Revenue',105,' '));
641: fnd_file.put_line(fnd_file.output,lpad('==============================',70,' ')||lpad('=========================',105,' '));
642: fnd_file.put_line(fnd_file.output,' ');
636: fnd_file.put_line(fnd_file.output,'Tax1 :- Standard Rate of Tax');
637: fnd_file.put_line(fnd_file.output,'Tax2 :- Higher Rate of Tax');
638: fnd_file.put_line(fnd_file.output,' ');
639:
640: fnd_file.put_line(fnd_file.output,lpad('PAYE Details in Oracle Payroll',70,' ')||lpad('PAYE Details from Revenue',105,' '));
641: fnd_file.put_line(fnd_file.output,lpad('==============================',70,' ')||lpad('=========================',105,' '));
642: fnd_file.put_line(fnd_file.output,' ');
643: fnd_file.put_line(fnd_file.output,lpad('PPS Number',11,' ')
644: -- for previous PAYE Details
637: fnd_file.put_line(fnd_file.output,'Tax2 :- Higher Rate of Tax');
638: fnd_file.put_line(fnd_file.output,' ');
639:
640: fnd_file.put_line(fnd_file.output,lpad('PAYE Details in Oracle Payroll',70,' ')||lpad('PAYE Details from Revenue',105,' '));
641: fnd_file.put_line(fnd_file.output,lpad('==============================',70,' ')||lpad('=========================',105,' '));
642: fnd_file.put_line(fnd_file.output,' ');
643: fnd_file.put_line(fnd_file.output,lpad('PPS Number',11,' ')
644: -- for previous PAYE Details
645: || lpad('Works',13,' ')
638: fnd_file.put_line(fnd_file.output,' ');
639:
640: fnd_file.put_line(fnd_file.output,lpad('PAYE Details in Oracle Payroll',70,' ')||lpad('PAYE Details from Revenue',105,' '));
641: fnd_file.put_line(fnd_file.output,lpad('==============================',70,' ')||lpad('=========================',105,' '));
642: fnd_file.put_line(fnd_file.output,' ');
643: fnd_file.put_line(fnd_file.output,lpad('PPS Number',11,' ')
644: -- for previous PAYE Details
645: || lpad('Works',13,' ')
646: || lpad('Last Name',16,' ')
639:
640: fnd_file.put_line(fnd_file.output,lpad('PAYE Details in Oracle Payroll',70,' ')||lpad('PAYE Details from Revenue',105,' '));
641: fnd_file.put_line(fnd_file.output,lpad('==============================',70,' ')||lpad('=========================',105,' '));
642: fnd_file.put_line(fnd_file.output,' ');
643: fnd_file.put_line(fnd_file.output,lpad('PPS Number',11,' ')
644: -- for previous PAYE Details
645: || lpad('Works',13,' ')
646: || lpad('Last Name',16,' ')
647: || lpad('I',3,' ')||lpad('F',3,' ')
657: || lpad('Cert Issue',12,' ')||lpad('Tot Pay',12,' ')
658: || lpad('Tot Tax',12,' ')||lpad('Tax1',6,' ')
659: || lpad('Tax2',6,' '));
660:
661: fnd_file.put_line(fnd_file.output, lpad('Number',24,' ')
662: || lpad('Cutoff',30,' ')||lpad('Credit',9,' ')
663: || lpad('Cutoff',10,' ')||lpad('Credit',10,' ')
664: || lpad('Date',10,' ')||lpad('to Date',15,' ')
665: || lpad('to Date',12,' ') ||lpad(' ',28,' ')
668: || lpad('Cutoff',10,' ')||lpad('Credit',10,' ')
669: || lpad('Date',10,' ')||lpad('to Date',15,' ')
670: || lpad('to Date',12,' '));
671:
672: fnd_file.put_line(fnd_file.output,lpad('----------',11,' ')
673: -- for previous PAYE Details
674: || lpad('----------',13,' ')
675: || lpad('---------',16,' ')
676: || lpad('-',3,' ')||lpad('-',3,' ')
716: --end of bug 6376140
717:
718:
719: -- Bug 6929566 Start
720: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_date is ' || r_pay.cert_date);
721: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_start_date is ' || r_pay.cert_start_date);
722: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_end_date is ' || r_pay.cert_end_date);
723: IF r_pay.cert_date < r_pay.cert_start_date THEN
724: l_effective_date := r_pay.cert_start_date;
717:
718:
719: -- Bug 6929566 Start
720: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_date is ' || r_pay.cert_date);
721: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_start_date is ' || r_pay.cert_start_date);
722: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_end_date is ' || r_pay.cert_end_date);
723: IF r_pay.cert_date < r_pay.cert_start_date THEN
724: l_effective_date := r_pay.cert_start_date;
725: ELSIF r_pay.cert_date >= r_pay.cert_start_date THEN
718:
719: -- Bug 6929566 Start
720: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_date is ' || r_pay.cert_date);
721: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_start_date is ' || r_pay.cert_start_date);
722: FND_FILE.PUT_LINE(FND_FILE.LOG, 'r_pay.cert_end_date is ' || r_pay.cert_end_date);
723: IF r_pay.cert_date < r_pay.cert_start_date THEN
724: l_effective_date := r_pay.cert_start_date;
725: ELSIF r_pay.cert_date >= r_pay.cert_start_date THEN
726: l_effective_date := r_pay.cert_date;
724: l_effective_date := r_pay.cert_start_date;
725: ELSIF r_pay.cert_date >= r_pay.cert_start_date THEN
726: l_effective_date := r_pay.cert_date;
727: END IF;
728: FND_FILE.PUT_LINE(FND_FILE.LOG, 'l_effective_date is ' || l_effective_date);
729: --
730: -- Bug 6929566 End
731:
732: --FOR r_pay IN c_pay
750: --ppsno_cnt := ppsno_cnt+1;
751: IF l_pps_number_hr IS NOT NULL THEN
752: ppsno_cnt := ppsno_cnt+1;
753: l_pps_number(ppsno_cnt) :=r_pay.pps_number_hr;
754: --fnd_file.put_line(l_pps_number(ppsno_cnt));
755: hr_utility.set_location('PPS Number..'||l_pps_number_hr,420);
756: -- checks for standard rate tax to be mandatory
757: IF l_std_rate_of_tax IS NULL THEN
758: raise std_rate_of_tax_is_null;
935: WHERE pps_number = r_pay.pps_number_int;
936: END IF;
937: hr_utility.set_location('Assignment Number..'||r_pay.employee_no_int,107);
938: IF p_validate_mode <> 'IE_VALIDATE' THEN
939: fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')||lpad(substr(r_pay.employee_no_int,1,12),13,' ')||lpad(' ',20,' ')||'Success');
940: ELSE
941: IF g_validate_count =1 then
942: hr_utility.set_location('PPS Number..Second check'||l_pps_number_hr,841);
943: hr_utility.set_location('Assignment Number..'||r_pay.employee_no_int,108);
1029: l_pay_to_date := 0;
1030: l_tax_to_date := 0;
1031: END IF;
1032: -- print the values.
1033: fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')
1034: -- for previous PAYE Details
1035: || lpad(substr(r_pay.employee_no_int,1,12),13,' ')
1036: || lpad(substr(r_pay.last_name_hr,1,15),16,' ')
1037: || lpad(pay_ie_paye_pkg.decode_value_char(r_paye_details.tax_basis='IE_WEEK1_MONTH1','1','0'),3,' ')
1062: -- Bug Fix 3500192
1063: -- WHEN name_not_equal THEN
1064: -- l_error := SQLERRM;
1065: -- retcode := 1;
1066: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1067: -- FND_FILE.PUT_LINE(fnd_file.log, 'The first name and last name in the interface body table does not match
1068: -- the first and last name in the payroll tables');
1069: --
1070: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1063: -- WHEN name_not_equal THEN
1064: -- l_error := SQLERRM;
1065: -- retcode := 1;
1066: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1067: -- FND_FILE.PUT_LINE(fnd_file.log, 'The first name and last name in the interface body table does not match
1068: -- the first and last name in the payroll tables');
1069: --
1070: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1071: -- FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1066: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1067: -- FND_FILE.PUT_LINE(fnd_file.log, 'The first name and last name in the interface body table does not match
1068: -- the first and last name in the payroll tables');
1069: --
1070: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1071: -- FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1072: -- r_pay.employee_no_hr ||', '||
1073: -- r_pay.last_name_hr ||' '||
1074: -- r_pay.first_name_hr ||', '||
1067: -- FND_FILE.PUT_LINE(fnd_file.log, 'The first name and last name in the interface body table does not match
1068: -- the first and last name in the payroll tables');
1069: --
1070: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1071: -- FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1072: -- r_pay.employee_no_hr ||', '||
1073: -- r_pay.last_name_hr ||' '||
1074: -- r_pay.first_name_hr ||', '||
1075: -- r_pay.last_name_int ||' '||
1101: --
1102: -- WHEN same_day THEN
1103: -- l_error := SQLERRM;
1104: -- retcode := 1;
1105: -- FND_FILE.PUT_LINE(fnd_file.log, 'This record has already been updated today with changes to the
1106: -- PAY_IE_PAYE_DETAILS_F table');
1107: --
1108: --
1109: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1105: -- FND_FILE.PUT_LINE(fnd_file.log, 'This record has already been updated today with changes to the
1106: -- PAY_IE_PAYE_DETAILS_F table');
1107: --
1108: --
1109: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1110: -- FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1111: -- r_pay.employee_no_hr ||', '||
1112: -- r_pay.last_name_hr ||' '||
1113: -- r_pay.first_name_hr ||', '||
1106: -- PAY_IE_PAYE_DETAILS_F table');
1107: --
1108: --
1109: -- FND_FILE.NEW_LINE(fnd_file.log, 1);
1110: -- FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1111: -- r_pay.employee_no_hr ||', '||
1112: -- r_pay.last_name_hr ||' '||
1113: -- r_pay.first_name_hr ||', '||
1114: -- r_pay.ppd_effective_start_date ||', '||
1139:
1140: /*WHEN future_day THEN
1141: l_error := SQLERRM;
1142: retcode := 1;
1143: FND_FILE.PUT_LINE(fnd_file.log, 'This record has been updated to a future date');
1144:
1145: FND_FILE.NEW_LINE(fnd_file.log, 1);
1146: FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1147: r_pay.employee_no_hr ||', '||
1141: l_error := SQLERRM;
1142: retcode := 1;
1143: FND_FILE.PUT_LINE(fnd_file.log, 'This record has been updated to a future date');
1144:
1145: FND_FILE.NEW_LINE(fnd_file.log, 1);
1146: FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1147: r_pay.employee_no_hr ||', '||
1148: r_pay.last_name_hr ||' '||
1149: r_pay.first_name_hr ||', '||
1142: retcode := 1;
1143: FND_FILE.PUT_LINE(fnd_file.log, 'This record has been updated to a future date');
1144:
1145: FND_FILE.NEW_LINE(fnd_file.log, 1);
1146: FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1147: r_pay.employee_no_hr ||', '||
1148: r_pay.last_name_hr ||' '||
1149: r_pay.first_name_hr ||', '||
1150: r_pay.payroll_name_hr
1173:
1174: WHEN std_rate_of_tax_is_null THEN
1175: l_error := 'Standard Rate of Tax cannot be Null';--SQLERRM;
1176: retcode := 1;
1177: FND_FILE.PUT_LINE(fnd_file.log, 'Standard Rate of Tax cannot be Null');
1178:
1179: FND_FILE.NEW_LINE(fnd_file.log, 1);
1180: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1181: r_pay.employee_no_hr ||', '||
1175: l_error := 'Standard Rate of Tax cannot be Null';--SQLERRM;
1176: retcode := 1;
1177: FND_FILE.PUT_LINE(fnd_file.log, 'Standard Rate of Tax cannot be Null');
1178:
1179: FND_FILE.NEW_LINE(fnd_file.log, 1);
1180: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1181: r_pay.employee_no_hr ||', '||
1182: r_pay.last_name_hr ||' '||
1183: r_pay.first_name_hr ||', '||
1176: retcode := 1;
1177: FND_FILE.PUT_LINE(fnd_file.log, 'Standard Rate of Tax cannot be Null');
1178:
1179: FND_FILE.NEW_LINE(fnd_file.log, 1);
1180: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1181: r_pay.employee_no_hr ||', '||
1182: r_pay.last_name_hr ||' '||
1183: r_pay.first_name_hr ||', '||
1184: r_pay.payroll_name_hr
1188: l_err_tab(err_cnt).p_works_number := substr(r_pay.employee_no_int,1,12);
1189: l_err_tab(err_cnt).p_err_msg := 'Failed : Standard Rate of Tax cannot be Null';
1190: err_cnt := err_cnt + 1;
1191: --ELSE
1192: -- fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')||lpad(substr(r_pay.employee_no_int,1,12),13,' ')||lpad(' ',20,' ')||'Failed : Standard Rate of Tax cannot be Null');
1193: --END IF;
1194: -- The exception details are written to an error table
1195:
1196: INSERT INTO pay_ie_tax_error ( pps_number
1215:
1216: WHEN higher_rate_of_tax_is_null THEN
1217: l_error := 'Higher Rate of Tax cannot be Null';--SQLERRM;
1218: retcode := 1;
1219: FND_FILE.PUT_LINE(fnd_file.log, 'Higher Rate of Tax cannot be Null');
1220:
1221: FND_FILE.NEW_LINE(fnd_file.log, 1);
1222: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1223: r_pay.employee_no_hr ||', '||
1217: l_error := 'Higher Rate of Tax cannot be Null';--SQLERRM;
1218: retcode := 1;
1219: FND_FILE.PUT_LINE(fnd_file.log, 'Higher Rate of Tax cannot be Null');
1220:
1221: FND_FILE.NEW_LINE(fnd_file.log, 1);
1222: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1223: r_pay.employee_no_hr ||', '||
1224: r_pay.last_name_hr ||' '||
1225: r_pay.first_name_hr ||', '||
1218: retcode := 1;
1219: FND_FILE.PUT_LINE(fnd_file.log, 'Higher Rate of Tax cannot be Null');
1220:
1221: FND_FILE.NEW_LINE(fnd_file.log, 1);
1222: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1223: r_pay.employee_no_hr ||', '||
1224: r_pay.last_name_hr ||' '||
1225: r_pay.first_name_hr ||', '||
1226: r_pay.payroll_name_hr
1231: l_err_tab(err_cnt).p_works_number := substr(r_pay.employee_no_int,1,12);
1232: l_err_tab(err_cnt).p_err_msg := 'Failed : Higher Rate of Tax cannot be Null';
1233: err_cnt := err_cnt + 1;
1234: --ELSE
1235: -- fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')||lpad(substr(r_pay.employee_no_int,1,12),13,' ')||lpad(' ',20,' ')||'Failed : Higher Rate of Tax cannot be Null');
1236: --END IF;
1237:
1238: -- The exception details are written to an error table
1239: INSERT INTO pay_ie_tax_error ( pps_number
1259: WHEN exemption_is_null THEN
1260:
1261: l_error := 'Exemption Indicator cannot be Null';--SQLERRM;
1262: retcode := 1;
1263: FND_FILE.PUT_LINE(fnd_file.log, 'Exemption Indicator cannot be Null');
1264:
1265: FND_FILE.NEW_LINE(fnd_file.log, 1);
1266: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1267: r_pay.employee_no_hr ||', '||
1261: l_error := 'Exemption Indicator cannot be Null';--SQLERRM;
1262: retcode := 1;
1263: FND_FILE.PUT_LINE(fnd_file.log, 'Exemption Indicator cannot be Null');
1264:
1265: FND_FILE.NEW_LINE(fnd_file.log, 1);
1266: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1267: r_pay.employee_no_hr ||', '||
1268: r_pay.last_name_hr ||' '||
1269: r_pay.first_name_hr ||', '||
1262: retcode := 1;
1263: FND_FILE.PUT_LINE(fnd_file.log, 'Exemption Indicator cannot be Null');
1264:
1265: FND_FILE.NEW_LINE(fnd_file.log, 1);
1266: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1267: r_pay.employee_no_hr ||', '||
1268: r_pay.last_name_hr ||' '||
1269: r_pay.first_name_hr ||', '||
1270: r_pay.payroll_name_hr
1275: l_err_tab(err_cnt).p_works_number := substr(r_pay.employee_no_int,1,12);
1276: l_err_tab(err_cnt).p_err_msg := 'Failed : Exemption Indicator cannot be Null';
1277: err_cnt := err_cnt + 1;
1278: --ELSE
1279: -- fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')||lpad(substr(r_pay.employee_no_int,1,12),13,' ')||lpad(' ',20,' ')||'Failed : Exemption Indicator cannot be Null');
1280: --END IF;
1281:
1282: -- The exception details are written to an error table
1283: INSERT INTO pay_ie_tax_error ( pps_number
1302:
1303: WHEN exemption_mismatch THEN
1304: l_error := 'The higher rate of tax for Exemption should be '||l_tax_rate_exempt||'%';--SQLERRM;
1305: retcode := 1;
1306: FND_FILE.PUT_LINE(fnd_file.log, 'The higher rate of tax for Exemption should be '||l_tax_rate_exempt||'%');
1307:
1308: FND_FILE.NEW_LINE(fnd_file.log, 1);
1309: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1310: r_pay.employee_no_hr ||', '||
1304: l_error := 'The higher rate of tax for Exemption should be '||l_tax_rate_exempt||'%';--SQLERRM;
1305: retcode := 1;
1306: FND_FILE.PUT_LINE(fnd_file.log, 'The higher rate of tax for Exemption should be '||l_tax_rate_exempt||'%');
1307:
1308: FND_FILE.NEW_LINE(fnd_file.log, 1);
1309: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1310: r_pay.employee_no_hr ||', '||
1311: r_pay.last_name_hr ||' '||
1312: r_pay.first_name_hr ||', '||
1305: retcode := 1;
1306: FND_FILE.PUT_LINE(fnd_file.log, 'The higher rate of tax for Exemption should be '||l_tax_rate_exempt||'%');
1307:
1308: FND_FILE.NEW_LINE(fnd_file.log, 1);
1309: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1310: r_pay.employee_no_hr ||', '||
1311: r_pay.last_name_hr ||' '||
1312: r_pay.first_name_hr ||', '||
1313: r_pay.payroll_name_hr
1318: l_err_tab(err_cnt).p_works_number := substr(r_pay.employee_no_int,1,12);
1319: l_err_tab(err_cnt).p_err_msg := 'Failed : The higher rate of tax for Exemption should be '||l_tax_rate_exempt||'%';
1320: err_cnt := err_cnt + 1;
1321: --ELSE
1322: -- fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')||lpad(substr(r_pay.employee_no_int,1,12),13,' ')||lpad(' ',20,' ')||'Failed : The higher rate of tax for Exemption should be '||l_tax_rate_exempt||'%');
1323: --END IF;
1324:
1325: -- The exception details are written to an error table
1326: INSERT INTO pay_ie_tax_error ( pps_number
1345:
1346: WHEN normal_tax_mismatch THEN
1347: l_error := 'The higher rate of tax for Cumulative or Week1/Month1 Tax Basis should be '||l_tax_rate_high||'%';--SQLERRM;
1348: retcode := 1;
1349: FND_FILE.PUT_LINE(fnd_file.log, 'The higher rate of tax for Cumulative or Week1/Month1 Tax Basis should be '||l_tax_rate_high||'%');
1350:
1351: FND_FILE.NEW_LINE(fnd_file.log, 1);
1352: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1353: r_pay.employee_no_hr ||', '||
1347: l_error := 'The higher rate of tax for Cumulative or Week1/Month1 Tax Basis should be '||l_tax_rate_high||'%';--SQLERRM;
1348: retcode := 1;
1349: FND_FILE.PUT_LINE(fnd_file.log, 'The higher rate of tax for Cumulative or Week1/Month1 Tax Basis should be '||l_tax_rate_high||'%');
1350:
1351: FND_FILE.NEW_LINE(fnd_file.log, 1);
1352: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1353: r_pay.employee_no_hr ||', '||
1354: r_pay.last_name_hr ||' '||
1355: r_pay.first_name_hr ||', '||
1348: retcode := 1;
1349: FND_FILE.PUT_LINE(fnd_file.log, 'The higher rate of tax for Cumulative or Week1/Month1 Tax Basis should be '||l_tax_rate_high||'%');
1350:
1351: FND_FILE.NEW_LINE(fnd_file.log, 1);
1352: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1353: r_pay.employee_no_hr ||', '||
1354: r_pay.last_name_hr ||' '||
1355: r_pay.first_name_hr ||', '||
1356: r_pay.payroll_name_hr
1361: l_err_tab(err_cnt).p_works_number := substr(r_pay.employee_no_int,1,12);
1362: l_err_tab(err_cnt).p_err_msg := 'Failed : The higher rate of tax for Cumulative or Week1/Month1 Tax Basis should be '||l_tax_rate_high||'%';
1363: err_cnt := err_cnt + 1;
1364: --ELSE
1365: -- fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')||lpad(substr(r_pay.employee_no_int,1,12),13,' ')||lpad(' ',20,' ')||'Failed : The higher rate of tax for Cumulative or Week1/Month1 Tax Basis should be '||l_tax_rate_high||'%');
1366: --END IF;
1367:
1368: -- The exception details are written to an error table
1369: INSERT INTO pay_ie_tax_error ( pps_number
1388:
1389: WHEN pay_to_date THEN
1390: l_error := 'Total Pay to Date and Total Tax to Date can be null only for Week1/Month1 basis.';--SQLERRM;
1391: retcode := 1;
1392: FND_FILE.PUT_LINE(fnd_file.log, 'Total Pay to Date and Total Tax to Date can be null only for Week1/Month1 basis.');
1393:
1394: FND_FILE.NEW_LINE(fnd_file.log, 1);
1395: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1396: r_pay.employee_no_hr ||', '||
1390: l_error := 'Total Pay to Date and Total Tax to Date can be null only for Week1/Month1 basis.';--SQLERRM;
1391: retcode := 1;
1392: FND_FILE.PUT_LINE(fnd_file.log, 'Total Pay to Date and Total Tax to Date can be null only for Week1/Month1 basis.');
1393:
1394: FND_FILE.NEW_LINE(fnd_file.log, 1);
1395: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1396: r_pay.employee_no_hr ||', '||
1397: r_pay.last_name_hr ||' '||
1398: r_pay.first_name_hr ||', '||
1391: retcode := 1;
1392: FND_FILE.PUT_LINE(fnd_file.log, 'Total Pay to Date and Total Tax to Date can be null only for Week1/Month1 basis.');
1393:
1394: FND_FILE.NEW_LINE(fnd_file.log, 1);
1395: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1396: r_pay.employee_no_hr ||', '||
1397: r_pay.last_name_hr ||' '||
1398: r_pay.first_name_hr ||', '||
1399: r_pay.payroll_name_hr
1404: l_err_tab(err_cnt).p_works_number := substr(r_pay.employee_no_int,1,12);
1405: l_err_tab(err_cnt).p_err_msg := 'Failed : Total Pay to Date and Total Tax to Date can be null only for Week1/Month1 basis';
1406: err_cnt := err_cnt + 1;
1407: --ELSE
1408: -- fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')||lpad(substr(r_pay.employee_no_int,1,12),13,' ')||lpad(' ',20,' ')||'Failed : Total Pay to Date and Total Tax to Date can be null only for Week1/Month1 basis');
1409: --END IF;
1410:
1411: -- The exception details are written to an error table
1412: INSERT INTO pay_ie_tax_error ( pps_number
1443: WHERE pps_number = r_pay.pps_number_int;
1444: END IF;
1445: -- The following command will be used to output the exception details to an output file:
1446:
1447: /*FND_FILE.PUT_LINE(fnd_file.output, r_pay.pps_number_hr ||','||
1448: r_pay.pps_number_int ||', '||
1449: r_pay.employee_no_hr ||', '||
1450: r_pay.pps_number_int ||', '||
1451: r_pay.last_name_hr ||' '||
1459: l_err_tab(err_cnt).p_works_number := substr(r_pay.employee_no_int,1,12);
1460: l_err_tab(err_cnt).p_err_msg := 'Failed : '||l_error;
1461: err_cnt := err_cnt + 1;
1462: --ELSE
1463: -- fnd_file.put_line(fnd_file.output,lpad(r_pay.pps_number_int,11,' ')||lpad(substr(r_pay.employee_no_int,1,12),13,' ')||lpad(' ',20,' ')||'Failed : '||l_error);
1464: --END IF;
1465: -- The exception details are written to an error table
1466:
1467: INSERT INTO pay_ie_tax_error ( pps_number
1493:
1494: IF l_err_tab.COUNT <> 0 then
1495: for i in l_err_tab.first..l_err_tab.last
1496: loop
1497: fnd_file.put_line(fnd_file.output,lpad(l_err_tab(i).p_pps_number,11,' ')||lpad(l_err_tab(i).p_works_number,13,' ')||lpad(' ',20,' ')||l_err_tab(i).p_err_msg);
1498: end loop;
1499: END IF;
1500: --bug 6376140
1501: /* for i in csr_skipped_asg
1499: END IF;
1500: --bug 6376140
1501: /* for i in csr_skipped_asg
1502: loop
1503: fnd_file.put_line(fnd_file.output,lpad(i.pps_number,11,' ')||lpad(i.works_number,13,' ')||lpad(' ',20,' ') || 'Please check the employee''s works number and/or PPS number');
1504: end loop;
1505: */
1506: FOR i in csr_skipped_assignments
1507: LOOP
1518: IF flag='N' THEN
1519: -- open check_pps(i.pps_number);
1520: -- FETCH check_pps INTO p_check_pps
1521: -- if check_pps%found then
1522: fnd_file.put_line(fnd_file.output,lpad(i.pps_number,11,' ')||lpad(substr(nvl(i.works_number,' '),1,12),13,' ')
1523: || lpad(substr(nvl(i.last_name,' '),1,20),16,' ')||lpad(substr(nvl(i.first_name,' '),1,20),16,' ')||'Please check the employee''s PPS number/works number');
1524: -- else
1525: -- else
1526: --fnd_file.put_line(fnd_file.output,lpad(i.pps_number,11,' ')||'Please check the employee''s PPS number');
1522: fnd_file.put_line(fnd_file.output,lpad(i.pps_number,11,' ')||lpad(substr(nvl(i.works_number,' '),1,12),13,' ')
1523: || lpad(substr(nvl(i.last_name,' '),1,20),16,' ')||lpad(substr(nvl(i.first_name,' '),1,20),16,' ')||'Please check the employee''s PPS number/works number');
1524: -- else
1525: -- else
1526: --fnd_file.put_line(fnd_file.output,lpad(i.pps_number,11,' ')||'Please check the employee''s PPS number');
1527: -- end if;
1528: -- close check_pps;
1529: END IF;
1530: END LOOP;
1549: EXCEPTION
1550: WHEN NO_DATA_FOUND THEN
1551: l_error := SQLERRM;
1552: retcode := 1;
1553: FND_FILE.PUT_LINE(fnd_file.log, 'No data found');
1554:
1555: INSERT INTO pay_ie_tax_error ( pps_number
1556: , employee_number
1557: , full_name
1580: l_error := SQLERRM;
1581: retcode := 2;
1582: /* The following command will be used to output the exception details to an output file*/
1583:
1584: /*FND_FILE.PUT_LINE(fnd_file.output, l_pps_number_hr ||', '||
1585: l_pps_number_int ||', '||
1586: l_employee_number_hr ||', '||
1587: l_employee_number_int ||', '||
1588: l_last_name_hr ||' '||l_first_name_hr ||', '||
1595: l_err_tab(err_cnt).p_works_number := substr(l_employee_number_int,1,12);
1596: l_err_tab(err_cnt).p_err_msg := 'Failed : OTHER in Main..'||l_error;
1597: err_cnt := err_cnt + 1;
1598: --ELSE
1599: -- fnd_file.put_line(fnd_file.output,lpad(l_pps_number_int,20,' ')||lpad(substr(l_employee_number_int,1,12),13,' ')||lpad(' ',20,' ')||'Failed : OTHER in Main..'||l_error);
1600: --END IF;
1601: /* The exception details are written to an error table */
1602: INSERT INTO pay_ie_tax_error ( pps_number
1603: , employee_number
1673: || rpad('-',8,'-')
1674: || ' '
1675: || rpad('-',8,'-');
1676:
1677: FND_FILE.NEW_LINE(fnd_file.log, 1);
1678: FND_FILE.PUT_LINE(fnd_file.log,l_line_1);
1679: FND_FILE.PUT_LINE(fnd_file.log,l_line_2);
1680: FND_FILE.PUT_LINE(fnd_file.log,l_line_3);
1681:
1674: || ' '
1675: || rpad('-',8,'-');
1676:
1677: FND_FILE.NEW_LINE(fnd_file.log, 1);
1678: FND_FILE.PUT_LINE(fnd_file.log,l_line_1);
1679: FND_FILE.PUT_LINE(fnd_file.log,l_line_2);
1680: FND_FILE.PUT_LINE(fnd_file.log,l_line_3);
1681:
1682: END log_ie_paye_header;
1675: || rpad('-',8,'-');
1676:
1677: FND_FILE.NEW_LINE(fnd_file.log, 1);
1678: FND_FILE.PUT_LINE(fnd_file.log,l_line_1);
1679: FND_FILE.PUT_LINE(fnd_file.log,l_line_2);
1680: FND_FILE.PUT_LINE(fnd_file.log,l_line_3);
1681:
1682: END log_ie_paye_header;
1683:
1676:
1677: FND_FILE.NEW_LINE(fnd_file.log, 1);
1678: FND_FILE.PUT_LINE(fnd_file.log,l_line_1);
1679: FND_FILE.PUT_LINE(fnd_file.log,l_line_2);
1680: FND_FILE.PUT_LINE(fnd_file.log,l_line_3);
1681:
1682: END log_ie_paye_header;
1683:
1684: PROCEDURE log_ie_paye_body(
1741: || rpad(nvl(to_char(r_paye_details.weekly_std_rate_cut_off),'-'),8,' ')
1742: || ' '
1743: || rpad(nvl(to_char(r_paye_details.monthly_std_rate_cut_off),'-'),8,' ');
1744:
1745: FND_FILE.PUT_LINE(fnd_file.log,l_line);
1746:
1747: END log_ie_paye_body;
1748:
1749: PROCEDURE log_ie_paye_footer(p_total IN NUMBER)
1751: l_line varchar2(100);
1752: BEGIN
1753: l_line := 'Number of Records: '
1754: || p_total;
1755: FND_FILE.NEW_LINE(fnd_file.log, 1);
1756: FND_FILE.PUT_LINE(fnd_file.log,l_line);
1757: FND_FILE.NEW_LINE(fnd_file.log, 1);
1758: END log_ie_paye_footer;
1759:
1752: BEGIN
1753: l_line := 'Number of Records: '
1754: || p_total;
1755: FND_FILE.NEW_LINE(fnd_file.log, 1);
1756: FND_FILE.PUT_LINE(fnd_file.log,l_line);
1757: FND_FILE.NEW_LINE(fnd_file.log, 1);
1758: END log_ie_paye_footer;
1759:
1760: END PAY_IE_TAX_VAL;
1753: l_line := 'Number of Records: '
1754: || p_total;
1755: FND_FILE.NEW_LINE(fnd_file.log, 1);
1756: FND_FILE.PUT_LINE(fnd_file.log,l_line);
1757: FND_FILE.NEW_LINE(fnd_file.log, 1);
1758: END log_ie_paye_footer;
1759:
1760: END PAY_IE_TAX_VAL;