tidying
parent
0e673929e2
commit
ebe72b68e0
8
app.ts
8
app.ts
|
|
@ -24,8 +24,6 @@ import routerWorkOrders from './routes/workOrders.js'
|
|||
import routerReports from './routes/reports.js'
|
||||
import routerAdmin from './routes/admin.js'
|
||||
|
||||
import { preloadCaches } from './helpers/functions.cache.js'
|
||||
|
||||
import * as configFunctions from './helpers/functions.config.js'
|
||||
import * as printFunctions from './helpers/functions.print.js'
|
||||
import * as dateTimeFns from '@cityssm/utils-datetime'
|
||||
|
|
@ -50,12 +48,6 @@ const debug = Debug(`lot-occupancy-system:app:${process.pid}`)
|
|||
|
||||
databaseInitializer.initializeDatabase()
|
||||
|
||||
/*
|
||||
* PRELOAD CACHES
|
||||
*/
|
||||
|
||||
// await preloadCaches()
|
||||
|
||||
/*
|
||||
* INITIALIZE APP
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ async function _getDynamicsGPDocument(documentNumber, lookupType) {
|
|||
switch (lookupType) {
|
||||
case 'invoice': {
|
||||
const invoice = await gp.getInvoiceByInvoiceNumber(documentNumber);
|
||||
if (invoice) {
|
||||
if (invoice !== undefined) {
|
||||
document = {
|
||||
documentType: 'Invoice',
|
||||
documentNumber: invoice.invoiceNumber,
|
||||
|
|
@ -28,7 +28,7 @@ async function _getDynamicsGPDocument(documentNumber, lookupType) {
|
|||
}
|
||||
case 'diamond/cashReceipt': {
|
||||
const receipt = await diamond.getCashReceiptByDocumentNumber(documentNumber);
|
||||
if (receipt) {
|
||||
if (receipt !== undefined) {
|
||||
document = {
|
||||
documentType: 'Cash Receipt',
|
||||
documentNumber: receipt.documentNumber.toString(),
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ async function _getDynamicsGPDocument(
|
|||
case 'invoice': {
|
||||
const invoice = await gp.getInvoiceByInvoiceNumber(documentNumber)
|
||||
|
||||
if (invoice) {
|
||||
if (invoice !== undefined) {
|
||||
document = {
|
||||
documentType: 'Invoice',
|
||||
documentNumber: invoice.invoiceNumber,
|
||||
|
|
@ -49,7 +49,7 @@ async function _getDynamicsGPDocument(
|
|||
documentNumber
|
||||
)
|
||||
|
||||
if (receipt) {
|
||||
if (receipt !== undefined) {
|
||||
document = {
|
||||
documentType: 'Cash Receipt',
|
||||
documentNumber: receipt.documentNumber.toString(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue