XERO files: Difference between revisions
From Data Islands
WikiSysopdi (talk | contribs) mNo edit summary |
WikiSysopdi (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
jscript "var today = new Date(); var myDate = new Date(); myDate.setDate(myDate.getDate() - 10); var somestring = '(UpdatedDateUTC >= DateTime(' + myDate.getFullYear() + ', ' + (myDate.getMonth() + 1) + ',' + myDate.getDate() + ') AND UpdatedDateUTC <= DateTime(' + today.getFullYear() + ',' + (today.getMonth() + 1) + ', ' + today.getDate() + ')) or UpdatedDateUTC = null'; return somestring;" | jscript "var today = new Date(); var myDate = new Date(); myDate.setDate(myDate.getDate() - 10); var somestring = '(UpdatedDateUTC >= DateTime(' + myDate.getFullYear() + ', ' + (myDate.getMonth() + 1) + ',' + myDate.getDate() + ') AND UpdatedDateUTC <= DateTime(' + today.getFullYear() + ',' + (today.getMonth() + 1) + ', ' + today.getDate() + ')) or UpdatedDateUTC = null'; return somestring;" | ||
querydb invoices jscriptoutput | querydb invoices jscriptoutput FILES |
Revision as of 11:23, 13 September 2023
Experimental feature that will get the invoice PDF files
Example
>querydb invoices UpdatedDateUTC>= DateTime(2022, 01, 01) AND UpdatedDateUTC<= DateTime(2022, 01, 31) FILES
Example 2 - using jscript to build the where clause
jscript "var today = new Date(); var myDate = new Date(); myDate.setDate(myDate.getDate() - 10); var somestring = '(UpdatedDateUTC >= DateTime(' + myDate.getFullYear() + ', ' + (myDate.getMonth() + 1) + ',' + myDate.getDate() + ') AND UpdatedDateUTC <= DateTime(' + today.getFullYear() + ',' + (today.getMonth() + 1) + ', ' + today.getDate() + ')) or UpdatedDateUTC = null'; return somestring;"
querydb invoices jscriptoutput FILES