DBA Data[Home] [Help]

APPS.ARRX_RC dependencies on AR_LOOKUPS

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

1275: IF var.p_confirmed_flag IS NOT NULL THEN
1276: dbms_sql.bind_variable(c, 'p_confirmed_flag', var.p_confirmed_flag);
1277: END IF;
1278:
1279: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1280: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1281: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1282: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';

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

1276: dbms_sql.bind_variable(c, 'p_confirmed_flag', var.p_confirmed_flag);
1277: END IF;
1278:
1279: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1280: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1281: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1282: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';

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

1277: END IF;
1278:
1279: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1280: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1281: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1282: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';

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

1278:
1279: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1280: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1281: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1282: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';

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

1279: select MEANING into L_CASH from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='CASH';
1280: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1281: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1282: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';

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

1280: select MEANING into L_MISC from ar_lookups where lookup_type='PAYMENT_CATEGORY_TYPE' and lookup_code='MISC';
1281: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1282: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';

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

1281: select MEANING into var.l_app from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='APP';
1282: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';

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

1282: select MEANING into var.l_nsf from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='NSF';
1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';

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

1283: select MEANING into var.l_rev from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='REV';
1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1291: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';

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

1284: select MEANING into var.l_stop from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='STOP';
1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1291: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1292: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';

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

1285: select MEANING into var.l_unapp from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNAPP';
1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1291: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1292: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1293: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';

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

1286: select MEANING into var.l_unid from ar_lookups where lookup_type='CHECK_STATUS' and lookup_code='UNID';
1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1291: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1292: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1293: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1294: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';

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

1287: select MEANING into L_PAYMENT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='PAYMENT';
1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1291: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1292: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1293: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1294: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';
1295:

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

1288: select MEANING into L_RECEIPT from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='RECEIPT';
1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1291: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1292: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1293: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1294: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';
1295:
1296: dbms_sql.bind_variable(c, 'L_CASH' , L_CASH);

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

1289: select MEANING into L_REMITTANCE from ar_lookups where lookup_type='CB_REFERENCE_TYPE' and lookup_code='REMITTANCE';
1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1291: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1292: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1293: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1294: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';
1295:
1296: dbms_sql.bind_variable(c, 'L_CASH' , L_CASH);
1297: dbms_sql.bind_variable(c, 'L_MISC' , L_MISC);

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

1290: select MEANING into L_APPROVED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='APPROVED';
1291: select MEANING into L_CLEARED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CLEARED';
1292: select MEANING into L_CONFIRMED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='CONFIRMED';
1293: select MEANING into L_REMITTED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REMITTED';
1294: select MEANING into L_REVERSED from ar_lookups where lookup_type='RECEIPT_CREATION_STATUS' and lookup_code='REVERSED';
1295:
1296: dbms_sql.bind_variable(c, 'L_CASH' , L_CASH);
1297: dbms_sql.bind_variable(c, 'L_MISC' , L_MISC);
1298: dbms_sql.bind_variable(c, 'L_APP' , var.l_app);

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

1313: if var.calling_program = 'ACTUAL' then
1314:
1315: fa_rx_util_pkg.debug('Define additional BIND variables for Actual Receipts Register');
1316:
1317: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';
1318: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';
1319: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';
1320: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';
1321:

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

1314:
1315: fa_rx_util_pkg.debug('Define additional BIND variables for Actual Receipts Register');
1316:
1317: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';
1318: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';
1319: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';
1320: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';
1321:
1322: dbms_sql.bind_variable(c, 'L_ACCO' , L_ACCO);

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

1315: fa_rx_util_pkg.debug('Define additional BIND variables for Actual Receipts Register');
1316:
1317: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';
1318: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';
1319: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';
1320: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';
1321:
1322: dbms_sql.bind_variable(c, 'L_ACCO' , L_ACCO);
1323: dbms_sql.bind_variable(c, 'L_APPL' , L_APPL);

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

1316:
1317: select MEANING into L_ACCO from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='ACC';
1318: select MEANING into L_APPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='APP';
1319: select MEANING into L_UNAPPL from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNAPP';
1320: select MEANING into L_UNIDE from ar_lookups where lookup_type='PAYMENT_TYPE' and lookup_code='UNID';
1321:
1322: dbms_sql.bind_variable(c, 'L_ACCO' , L_ACCO);
1323: dbms_sql.bind_variable(c, 'L_APPL' , L_APPL);
1324: dbms_sql.bind_variable(c, 'L_UNAPPL' , L_UNAPPL);

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

1328: elsif var.calling_program = 'APPLIED' then
1329:
1330: fa_rx_util_pkg.debug('Define additional BIND variables for Applied Receipts Register');
1331:
1332: SELECT substrb(meaning,1,20) INTO L_ONACCOUNT FROM ar_lookups WHERE lookup_type='PAYMENT_TYPE' AND lookup_code='ACC';
1333:
1334: dbms_sql.bind_variable(c, 'L_ONACCOUNT' , L_ONACCOUNT);
1335:
1336: IF var.p_apply_date_low IS NOT NULL THEN