05-09-2022 04:26:16.277+0530 [info] : [Incoming] GET - / Incoming  
Payload : {} 


05-09-2022 12:34:49.114+0530 [info] : [Incoming] GET - /v1/refVersion/ Incoming [RETAILER - 214828] 
Payload : {} 


05-09-2022 12:34:49.205+0530 [info] : [200] GET - /v1/refVersion/ Success   


05-09-2022 12:34:53.285+0530 [info] : [Incoming] GET - /v1/measurements Incoming [RETAILER - 214828] 
Payload : {} 


05-09-2022 12:34:53.293+0530 [info] : [200] GET - /v1/measurements Success   


05-09-2022 12:34:53.320+0530 [info] : [Incoming] POST - /v1/getLastInvoiceNumber Incoming [RETAILER - 214828] 
Payload : {"userid":"214828"} 


05-09-2022 12:34:53.353+0530 [info] : [200] POST - /v1/getLastInvoiceNumber Success  
Payload : {"userid":"214828"} 


05-09-2022 12:35:09.665+0530 [info] : [Incoming] GET - /v1/refVersion/ Incoming [RETAILER - 214828] 
Payload : {} 


05-09-2022 12:35:09.676+0530 [info] : [200] GET - /v1/refVersion/ Success   


05-09-2022 12:35:13.472+0530 [info] : [Incoming] GET - /v1/measurements Incoming [RETAILER - 214828] 
Payload : {} 


05-09-2022 12:35:13.478+0530 [info] : [200] GET - /v1/measurements Success   


05-09-2022 12:35:13.490+0530 [info] : [Incoming] POST - /v1/getLastInvoiceNumber Incoming [RETAILER - 214828] 
Payload : {"userid":"214828"} 


05-09-2022 12:35:13.498+0530 [info] : [200] POST - /v1/getLastInvoiceNumber Success  
Payload : {"userid":"214828"} 


05-09-2022 12:35:21.401+0530 [info] : [Incoming] GET - /v1/getSignupUrl/ Incoming [RETAILER - 214828] 
Payload : {} 


05-09-2022 12:35:22.457+0530 [info] : [200] GET - /v1/getSignupUrl/ Success   


05-09-2022 12:41:13.808+0530 [info] : [Incoming] GET - /v1/refVersion/ Incoming [RETAILER - 214788] 
Payload : {} 


05-09-2022 12:41:13.842+0530 [info] : [200] GET - /v1/refVersion/ Success   


05-09-2022 12:41:24.487+0530 [info] : [Incoming] GET - /v1/measurements Incoming [RETAILER - 214788] 
Payload : {} 


05-09-2022 12:41:24.500+0530 [info] : [200] GET - /v1/measurements Success   


05-09-2022 12:41:24.522+0530 [info] : [Incoming] POST - /v1/getLastInvoiceNumber Incoming [RETAILER - 214788] 
Payload : {"userid":"214788"} 


05-09-2022 12:41:24.548+0530 [info] : [200] POST - /v1/getLastInvoiceNumber Success  
Payload : {"userid":"214788"} 


05-09-2022 12:41:35.112+0530 [info] : [Incoming] GET - /v1/refVersion/ Incoming [RETAILER - 214788] 
Payload : {} 


05-09-2022 12:41:35.118+0530 [info] : [200] GET - /v1/refVersion/ Success   


05-09-2022 13:26:08.642+0530 [info] : [Incoming] POST - /v1/invoice Incoming  
Payload : {"customerMobileNo":"8970324593","customerName":"manju","discount":0,"gstBillNo":0,"invoiceDate":"2022-09-05","items":[{"gst":0,"gstAmount":9000,"gstType":"CGST/SGST (Local customer)","id":-1,"imei":"","invoiceid":-1,"is_active":true,"measurementId":1,"name":"half t shirt lower print ","price":180,"quantity":50,"serial_no":"","totalAmount":9000},{"gst":0,"gstAmount":2000,"gstType":"CGST/SGST (Local customer)","id":-1,"imei":"","invoiceid":-1,"is_active":true,"measurementId":1,"name":"print ","price":40,"quantity":50,"serial_no":"","totalAmount":2000}],"nonGstBillNo":31,"totalAfterDiscount":11000,"totalAmount":11000,"totalAmountBeforeGST":11000,"userid":"224689"} 


05-09-2022 13:26:08.782+0530 [error] : [500] POST - /v1/invoice Cannot add or update a child row: a foreign key constraint fails (`tbbdev_devdb`.`customers`, CONSTRAINT `customers_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`))  
Payload : {"customerMobileNo":"8970324593","customerName":"manju","discount":0,"gstBillNo":0,"invoiceDate":"2022-09-05","items":[{"gst":0,"gstAmount":9000,"gstType":"CGST/SGST (Local customer)","id":-1,"imei":"","invoiceid":-1,"is_active":true,"measurementId":1,"name":"half t shirt lower print ","price":180,"quantity":50,"serial_no":"","totalAmount":9000},{"gst":0,"gstAmount":2000,"gstType":"CGST/SGST (Local customer)","id":-1,"imei":"","invoiceid":-1,"is_active":true,"measurementId":1,"name":"print ","price":40,"quantity":50,"serial_no":"","totalAmount":2000}],"nonGstBillNo":31,"totalAfterDiscount":11000,"totalAmount":11000,"totalAmountBeforeGST":11000,"userid":"224689"} Error: Cannot add or update a child row: a foreign key constraint fails (`tbbdev_devdb`.`customers`, CONSTRAINT `customers_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`))
    at Packet.asError (/home/tbbdev/public_html/billbook/node_modules/mysql2/lib/packets/packet.js:708:17)
    at Execute.execute (/home/tbbdev/public_html/billbook/node_modules/mysql2/lib/commands/command.js:28:26)
    at Connection.handlePacket (/home/tbbdev/public_html/billbook/node_modules/mysql2/lib/connection.js:408:32)
    at PacketParser.Connection.packetParser.p [as onPacket] (/home/tbbdev/public_html/billbook/node_modules/mysql2/lib/connection.js:70:12)
    at PacketParser.executeStart (/home/tbbdev/public_html/billbook/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.Connection.stream.on.data (/home/tbbdev/public_html/billbook/node_modules/mysql2/lib/connection.js:77:25)
    at Socket.emit (events.js:198:13)
    at Socket.EventEmitter.emit (domain.js:448:20)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)


05-09-2022 14:59:30.139+0530 [info] : [Incoming] GET - /v1/refVersion/ Incoming [RETAILER - 214828] 
Payload : {} 


05-09-2022 14:59:30.316+0530 [info] : [200] GET - /v1/refVersion/ Success   


05-09-2022 14:59:39.637+0530 [info] : [Incoming] POST - /v1/getOTP Incoming [RETAILER - 214828] 
Payload : {"mobileNo":"8328290542"} 


05-09-2022 14:59:40.962+0530 [info] : [200] POST - /v1/getOTP Success  
Payload : {"mobileNo":"8328290542"} 


05-09-2022 14:59:48.225+0530 [info] : [Incoming] POST - /v1/verifyOTP Incoming [RETAILER - 214828] 
Payload : {"otp":"099038","mobileNo":"8328290542"} 


05-09-2022 14:59:48.586+0530 [info] : [200] POST - /v1/verifyOTP Success  
Payload : {"otp":"099038","mobileNo":"8328290542"} 


05-09-2022 14:59:49.540+0530 [info] : [Incoming] GET - /v1/measurements Incoming [RETAILER - 214828] 
Payload : {} 


05-09-2022 14:59:49.548+0530 [info] : [200] GET - /v1/measurements Success   


05-09-2022 14:59:50.490+0530 [info] : [Incoming] POST - /v1/getLastInvoiceNumber Incoming [RETAILER - 214828] 
Payload : {"userid":"214828"} 


05-09-2022 14:59:50.503+0530 [info] : [200] POST - /v1/getLastInvoiceNumber Success  
Payload : {"userid":"214828"} 


05-09-2022 17:24:53.077+0530 [info] : [Incoming] GET - /v1/refVersion/ Incoming [RETAILER - 214817] 
Payload : {} 


05-09-2022 17:24:53.128+0530 [info] : [200] GET - /v1/refVersion/ Success   


05-09-2022 17:24:56.607+0530 [info] : [Incoming] GET - /v1/measurements Incoming [RETAILER - 214817] 
Payload : {} 


05-09-2022 17:24:56.615+0530 [info] : [200] GET - /v1/measurements Success   


05-09-2022 17:24:56.622+0530 [info] : [Incoming] POST - /v1/getLastInvoiceNumber Incoming [RETAILER - 214817] 
Payload : {"userid":"214817"} 


05-09-2022 17:24:56.644+0530 [info] : [200] POST - /v1/getLastInvoiceNumber Success  
Payload : {"userid":"214817"} 


05-09-2022 17:25:08.935+0530 [info] : [Incoming] POST - /v1/getLastInvoiceNumber Incoming [RETAILER - 214817] 
Payload : {"userid":"214817"} 


05-09-2022 17:25:08.949+0530 [info] : [200] POST - /v1/getLastInvoiceNumber Success  
Payload : {"userid":"214817"} 


05-09-2022 17:25:09.939+0530 [info] : [Incoming] GET - /v1/expense/214817 Incoming [RETAILER - 214817] 
Payload : {} 


05-09-2022 17:25:09.956+0530 [info] : [200] GET - /v1/expense/214817 Success   


05-09-2022 17:25:11.406+0530 [info] : [Incoming] POST - /v1/getLastInvoiceNumber Incoming [RETAILER - 214817] 
Payload : {"userid":"214817"} 


05-09-2022 17:25:11.415+0530 [info] : [200] POST - /v1/getLastInvoiceNumber Success  
Payload : {"userid":"214817"} 


05-09-2022 17:25:12.184+0530 [info] : [Incoming] POST - /v1/searchInvoice Incoming [RETAILER - 214817] 
Payload : {"page":"1","userid":"214817"} 


05-09-2022 17:25:12.237+0530 [info] : [200] POST - /v1/searchInvoice Success  
Payload : {"page":"1","userid":"214817"} 


05-09-2022 17:25:16.327+0530 [info] : [Incoming] PUT - /v1/updateInvoice/449969 Incoming [RETAILER - 214817] 
Payload : {"customerName":"nishant","customerMobileNo":"9643385874","customerAddress":"","GSTNo":"","userid":"214817","invoiceDate":"2022-08-10","totalAmountBeforeGST":50,"discount":0,"totalAfterDiscount":50,"totalAmount":50,"gstBillNo":0,"nonGstBillNo":9,"gstType":"","items":[{"databaseid":1,"gst":0,"gstAmount":50,"gstType":"CGST/SGST (Local customer)","id":1413448,"invoiceid":449969,"isSync":0,"is_active":true,"localInvoiceId":449969,"localid":16,"measurementId":0,"name":"maggie","price":25,"quantity":2,"totalAmount":50,"user":0}]} 


05-09-2022 17:25:16.431+0530 [info] : [200] PUT - /v1/updateInvoice/449969 Success  
Payload : {"GSTNo":"","userid":"214817","invoiceDate":1660152316000,"totalAmountBeforeGST":50,"discount":0,"totalAfterDiscount":50,"totalAmount":50,"gstBillNo":0,"nonGstBillNo":9,"gstType":"","items":[{"databaseid":1,"gst":0,"gstAmount":50,"gstType":"CGST/SGST (Local customer)","id":1413448,"invoiceid":"449969","isSync":0,"is_active":true,"localInvoiceId":449969,"localid":16,"measurementId":0,"name":"maggie","price":25,"quantity":2,"totalAmount":50,"user":0,"userId":"214817"}],"customerid":344843,"id":"449969"} 


05-09-2022 17:25:19.706+0530 [info] : [Incoming] PUT - /v1/updateInvoicePdf/449969 Incoming [RETAILER - 214817] 
Payload : {} 


05-09-2022 17:25:22.543+0530 [info] : [200] PUT - /v1/updateInvoicePdf/449969 Success  
Payload : {"pdfLink":"https://storage.googleapis.com/billbook_stage/billpdfs/upload_3e31d3f7528de24ff6e8eb59c72882e9.pdf","id":"449969"} 


05-09-2022 17:25:34.113+0530 [info] : [Incoming] GET - /v1/getInvoiceUrl/449969 Incoming [RETAILER - 214817] 
Payload : {} 


05-09-2022 17:25:36.055+0530 [info] : [200] GET - /v1/getInvoiceUrl/449969 Success   


05-09-2022 17:25:37.892+0530 [info] : [Incoming] GET - /v1/getInvoiceUrl/449969 Incoming [RETAILER - 214817] 
Payload : {} 


05-09-2022 17:25:38.541+0530 [info] : [200] GET - /v1/getInvoiceUrl/449969 Success   


05-09-2022 17:26:18.205+0530 [info] : [Incoming] GET - / Incoming  
Payload : {} 


05-09-2022 17:53:48.457+0530 [info] : [Incoming] GET - / Incoming  
Payload : {} 


