DBA Data[Home] [Help]

APPS.ARRX_RC dependencies on AR_LOOKUPS

Line 1206: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';

1202: IF var.p_confirmed_flag IS NOT NULL THEN
1203: dbms_sql.bind_variable(c, 'p_confirmed_flag', var.p_confirmed_flag);
1204: END IF;
1205:
1206: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1207: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1208: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';

Line 1207: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';

1203: dbms_sql.bind_variable(c, 'p_confirmed_flag', var.p_confirmed_flag);
1204: END IF;
1205:
1206: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1207: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1208: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';

Line 1208: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';

1204: END IF;
1205:
1206: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1207: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1208: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';

Line 1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';

1205:
1206: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1207: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1208: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';

Line 1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';

1206: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1207: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1208: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';

Line 1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';

1207: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1208: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';

Line 1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';

1208: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';

Line 1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';

1209: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';

Line 1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';

1210: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';

Line 1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';

1211: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1219: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';

Line 1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';

1212: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1219: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1220: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';

Line 1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';

1213: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1219: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1220: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1221: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';

Line 1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';

1214: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1219: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1220: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1221: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';
1222:

Line 1219: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';

1215: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1219: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1220: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1221: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';
1222:
1223: dbms_sql.bind_variable(c, 'L_CASH' , L_CASH);

Line 1220: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';

1216: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1219: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1220: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1221: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';
1222:
1223: dbms_sql.bind_variable(c, 'L_CASH' , L_CASH);
1224: dbms_sql.bind_variable(c, 'L_MISC' , L_MISC);

Line 1221: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';

1217: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1218: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1219: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1220: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1221: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';
1222:
1223: dbms_sql.bind_variable(c, 'L_CASH' , L_CASH);
1224: dbms_sql.bind_variable(c, 'L_MISC' , L_MISC);
1225: dbms_sql.bind_variable(c, 'L_APP' , var.l_app);

Line 1244: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';

1240: if var.calling_program = 'ACTUAL' then
1241:
1242: fa_rx_util_pkg.debug('Define additional BIND variables for Actual Receipts Register');
1243:
1244: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';
1245: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';
1246: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';
1247: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';
1248:

Line 1245: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';

1241:
1242: fa_rx_util_pkg.debug('Define additional BIND variables for Actual Receipts Register');
1243:
1244: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';
1245: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';
1246: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';
1247: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';
1248:
1249: dbms_sql.bind_variable(c, 'L_ACCO' , L_ACCO);

Line 1246: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';

1242: fa_rx_util_pkg.debug('Define additional BIND variables for Actual Receipts Register');
1243:
1244: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';
1245: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';
1246: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';
1247: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';
1248:
1249: dbms_sql.bind_variable(c, 'L_ACCO' , L_ACCO);
1250: dbms_sql.bind_variable(c, 'L_APPL' , L_APPL);

Line 1247: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';

1243:
1244: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';
1245: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';
1246: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';
1247: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';
1248:
1249: dbms_sql.bind_variable(c, 'L_ACCO' , L_ACCO);
1250: dbms_sql.bind_variable(c, 'L_APPL' , L_APPL);
1251: dbms_sql.bind_variable(c, 'L_UNAPPL' , L_UNAPPL);

Line 1259: SELECT substrb(meaning,1,20) INTO L_ONACCOUNT FROM ar_lookups WHERE lookup_type='PAYMENT_TYPE' AND lookup_code='ACC';

1255: elsif var.calling_program = 'APPLIED' then
1256:
1257: fa_rx_util_pkg.debug('Define additional BIND variables for Applied Receipts Register');
1258:
1259: SELECT substrb(meaning,1,20) INTO L_ONACCOUNT FROM ar_lookups WHERE lookup_type='PAYMENT_TYPE' AND lookup_code='ACC';
1260:
1261: dbms_sql.bind_variable(c, 'L_ONACCOUNT' , L_ONACCOUNT);
1262:
1263: IF var.p_apply_date_low IS NOT NULL THEN