Sheetgo Automated invoice script - Date format


#1

Hi again!

Struggling with a small issue and hope somebody can help. The invoices are generating the date in an unknown way, I’ve included some screenshots:

51 00

I would be happy to enter the values manually or have the date work the same as another column but when removing the date code from the script it returns an error that I can’t work out and renaming the column to something other than ‘date’ stops the script from running.

Any help would be much appreciated.


#2

@MikeHarp Hi Mike, would you mind going to column E Selecting one of these rows, going to
Format → Number and telling me how its set up?
Also, what settings are you using under File → Spreadsheet Settings ?


#3

Hi Eugenia,

Thanks for the reply. Here are the settings (though I’m actually in London, UK):

15


#4

@MikeHarp

On line 189 write the following:
Logger.log(values);
Run the function and paste the logs here.
Let’s see if we find out what is going wrong


#5

Hi Eugenia,

I’ve added the line and run the function - where do I find the logs?


#6

@MikeHarp
They are under View menu:
image


#7

@eugenia - I’m getting no result, is this correct:


#8

@MikeHarp

Try the following:
→Add a new line, so the script has a new invoice to generate
→Run the script (you might need to wait until finish)
→Check both Logs and Execution Transcript.

:+1:


#9

Hi Eugenia, thanks for the continued help. Ran the script again with a new line, nothing in log, this in transcript:


#10

@MikeHarp

Anything below Document.getBody()?


#11

Didn’t realise it scrolled! Doh!

Here’s the rest:

[19-03-29 05:06:15:523 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:525 PDT] Text.replaceText([%%, ]) [0.001 seconds]
[19-03-29 05:06:15:526 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:528 PDT] Text.replaceText([%da_email%, tariq@cnwtransport.com]) [0.001 seconds]
[19-03-29 05:06:15:529 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:532 PDT] Text.replaceText([%da_name%, #N/A]) [0.001 seconds]
[19-03-29 05:06:15:533 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:535 PDT] Text.replaceText([%vat%, ]) [0.001 seconds]
[19-03-29 05:06:15:536 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:538 PDT] Text.replaceText([%da_address%, 4 Never never land, City of nowhere, RM12 4GG]) [0.001 seconds]
[19-03-29 05:06:15:539 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:541 PDT] Text.replaceText([%date%, 27/21/2019]) [0.001 seconds]
[19-03-29 05:06:15:542 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:544 PDT] Text.replaceText([%full_route%, Full Route]) [0.001 seconds]
[19-03-29 05:06:15:545 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:546 PDT] Text.replaceText([%fr_qty%, ]) [0.001 seconds]
[19-03-29 05:06:15:547 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:548 PDT] Text.replaceText([%fr_price%, £120.00]) [0.001 seconds]
[19-03-29 05:06:15:549 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:551 PDT] Text.replaceText([%fr_subtotal%, ]) [0.001 seconds]
[19-03-29 05:06:15:552 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:554 PDT] Text.replaceText([%half_route%, Half Route]) [0.001 seconds]
[19-03-29 05:06:15:555 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:556 PDT] Text.replaceText([%hr_qty%, ]) [0.001 seconds]
[19-03-29 05:06:15:557 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:559 PDT] Text.replaceText([%hr_price%, £60.00]) [0.001 seconds]
[19-03-29 05:06:15:559 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:560 PDT] Text.replaceText([%hr_subtotal%, ]) [0 seconds]
[19-03-29 05:06:15:561 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:562 PDT] Text.replaceText([%miles%, Fuel Reimbursement]) [0 seconds]
[19-03-29 05:06:15:562 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:564 PDT] Text.replaceText([%m_qty%, ]) [0 seconds]
[19-03-29 05:06:15:564 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:566 PDT] Text.replaceText([%m_price%, £0.18]) [0.001 seconds]
[19-03-29 05:06:15:567 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:568 PDT] Text.replaceText([%m_total%, ]) [0.001 seconds]
[19-03-29 05:06:15:569 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:570 PDT] Text.replaceText([%es1_desc%,  , , , , , ,]) [0.001 seconds]
[19-03-29 05:06:15:571 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:572 PDT] Text.replaceText([%es1_qty%, ]) [0.001 seconds]
[19-03-29 05:06:15:573 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:574 PDT] Text.replaceText([%es1_total%, ]) [0.001 seconds]
[19-03-29 05:06:15:575 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:576 PDT] Text.replaceText([%es2_desc%, Support Requested]) [0.001 seconds]
[19-03-29 05:06:15:576 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:577 PDT] Text.replaceText([%es2_qty%, ]) [0 seconds]
[19-03-29 05:06:15:578 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:579 PDT] Text.replaceText([%es2_total%, ]) [0 seconds]
[19-03-29 05:06:15:580 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:581 PDT] Text.replaceText([%byod_desc%, BYOD (bring your own device)]) [0.001 seconds]
[19-03-29 05:06:15:581 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:583 PDT] Text.replaceText([%byod_qty%, ]) [0.001 seconds]
[19-03-29 05:06:15:583 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:585 PDT] Text.replaceText([%byod_price%, £1.80]) [0.001 seconds]
[19-03-29 05:06:15:586 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:587 PDT] Text.replaceText([%byod_total%, ]) [0.001 seconds]
[19-03-29 05:06:15:588 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:589 PDT] Text.replaceText([%dart_desc%, Dartford Crossing]) [0.001 seconds]
[19-03-29 05:06:15:590 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:591 PDT] Text.replaceText([%dart_qty%, ]) [0.001 seconds]
[19-03-29 05:06:15:592 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:593 PDT] Text.replaceText([%dart_price%, £3.00]) [0.001 seconds]
[19-03-29 05:06:15:594 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:595 PDT] Text.replaceText([%dart_total%, ]) [0.001 seconds]
[19-03-29 05:06:15:596 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:597 PDT] Text.replaceText([%late_desc%, Late Departure Fee]) [0.001 seconds]
[19-03-29 05:06:15:598 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:599 PDT] Text.replaceText([%late_fee%, ]) [0.001 seconds]
[19-03-29 05:06:15:600 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:602 PDT] Text.replaceText([%bonus%, KPI / PHR Bonus]) [0.001 seconds]
[19-03-29 05:06:15:602 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:603 PDT] Text.replaceText([%bon_price%, ]) [0.001 seconds]
[19-03-29 05:06:15:604 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:605 PDT] Text.replaceText([%v_rent%, Van Rental]) [0.001 seconds]
[19-03-29 05:06:15:606 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:607 PDT] Text.replaceText([%vrent_price%, ]) [0.001 seconds]
[19-03-29 05:06:15:608 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:609 PDT] Text.replaceText([%over_pay%, Over pay correction]) [0.001 seconds]
[19-03-29 05:06:15:610 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:612 PDT] Text.replaceText([%opay_price%, ]) [0.001 seconds]
[19-03-29 05:06:15:612 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:614 PDT] Text.replaceText([%pcn_desc%, Penalty Charge Notice / Admin Fee]) [0.001 seconds]
[19-03-29 05:06:15:614 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:616 PDT] Text.replaceText([%pcn_price%, ]) [0 seconds]
[19-03-29 05:06:15:616 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:617 PDT] Text.replaceText([%v_dam%, Van Damage]) [0.001 seconds]
[19-03-29 05:06:15:618 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:619 PDT] Text.replaceText([%vdam_price%, ]) [0.001 seconds]
[19-03-29 05:06:15:620 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:621 PDT] Text.replaceText([%fuel_desc%, Fuel Card Usage]) [0 seconds]
[19-03-29 05:06:15:622 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:622 PDT] Text.replaceText([%fuel_price%, ]) [0 seconds]
[19-03-29 05:06:15:623 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:624 PDT] Text.replaceText([%insurance%, Insurance Excess Charge]) [0 seconds]
[19-03-29 05:06:15:624 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:625 PDT] Text.replaceText([%insu_price%, ]) [0 seconds]
[19-03-29 05:06:15:626 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:627 PDT] Text.replaceText([%prop_dam%, Property Damage]) [0.001 seconds]
[19-03-29 05:06:15:628 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:629 PDT] Text.replaceText([%prop_price%, ]) [0.001 seconds]
[19-03-29 05:06:15:630 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:631 PDT] Text.replaceText([%escalation%, Escalation]) [0.001 seconds]
[19-03-29 05:06:15:632 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:633 PDT] Text.replaceText([%esc_price%, ]) [0.001 seconds]
[19-03-29 05:06:15:634 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:635 PDT] Text.replaceText([%device%, Device]) [0.001 seconds]
[19-03-29 05:06:15:636 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:637 PDT] Text.replaceText([%dev_price%, ]) [0.001 seconds]
[19-03-29 05:06:15:637 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:638 PDT] Text.replaceText([%k_chain%, Key Chain]) [0 seconds]
[19-03-29 05:06:15:639 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:640 PDT] Text.replaceText([%kc_price%, ]) [0 seconds]
[19-03-29 05:06:15:641 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:642 PDT] Text.replaceText([%hi_vis%, Hi-Vis Vest]) [0.001 seconds]
[19-03-29 05:06:15:642 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:643 PDT] Text.replaceText([%hivis_price%, ]) [0 seconds]
[19-03-29 05:06:15:644 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:645 PDT] Text.replaceText([%earn_total%, £690.00]) [0.001 seconds]
[19-03-29 05:06:15:645 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:646 PDT] Text.replaceText([%tot_deduct%, ]) [0 seconds]
[19-03-29 05:06:15:647 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:648 PDT] Text.replaceText([%vat_rate%, ]) [0 seconds]
[19-03-29 05:06:15:649 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:650 PDT] Text.replaceText([%vat_amount%, ]) [0.001 seconds]
[19-03-29 05:06:15:650 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:652 PDT] Text.replaceText([%tot_paid%, 690]) [0 seconds]
[19-03-29 05:06:15:652 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:653 PDT] Text.replaceText([%PDF Url%, ]) [0 seconds]
[19-03-29 05:06:15:654 PDT] Sheet.getRange([B2]) [0 seconds]
[19-03-29 05:06:15:654 PDT] Range.getValue() [0 seconds]
[19-03-29 05:06:15:655 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:15:656 PDT] Text.replaceText([%number%, 0207/2019]) [0.001 seconds]
[19-03-29 05:06:15:657 PDT] DocumentApp.openById([1IL-Wpr8GV9MroHM8M-9GtTKlw3fZ3i5UpYPYg2FQYrk]) [0 seconds]
[19-03-29 05:06:15:960 PDT] Document.setName([#N/A 0207/2019]) [0.302 seconds]
[19-03-29 05:06:16:061 PDT] Document.saveAndClose() [0.101 seconds]
[19-03-29 05:06:16:062 PDT] SpreadsheetApp.getActiveSpreadsheet() [0 seconds]
[19-03-29 05:06:16:063 PDT] Spreadsheet.getSheetByName([Settings]) [0 seconds]
[19-03-29 05:06:16:294 PDT] DocumentApp.openById([1IL-Wpr8GV9MroHM8M-9GtTKlw3fZ3i5UpYPYg2FQYrk]) [0.231 seconds]
[19-03-29 05:06:16:295 PDT] DocumentApp.openById([1IL-Wpr8GV9MroHM8M-9GtTKlw3fZ3i5UpYPYg2FQYrk]) [0 seconds]
[19-03-29 05:06:16:394 PDT] Document.getAs([application/pdf]) [0.098 seconds]
[19-03-29 05:06:17:370 PDT] Document.getName() [0.975 seconds]
[19-03-29 05:06:17:371 PDT] Blob.setName([#N/A 0207/2019.pdf]) [0.001 seconds]
[19-03-29 05:06:17:372 PDT] Sheet.getRange([B3]) [0 seconds]
[19-03-29 05:06:17:373 PDT] Range.getValue() [0 seconds]
[19-03-29 05:06:17:527 PDT] DriveApp.getFolderById([1lDUW8C3d7Q60gyn8b6geEozi1g9jrQx9]) [0.154 seconds]
[19-03-29 05:06:17:528 PDT] Blob.getName() [0 seconds]
[19-03-29 05:06:17:528 PDT] Blob.getContentType() [0 seconds]
[19-03-29 05:06:22:370 PDT] Folder.createFile([Blob]) [4.842 seconds]
[19-03-29 05:06:22:371 PDT] File.getUrl() [0 seconds]
[19-03-29 05:06:22:371 PDT] File.getId() [0 seconds]
[19-03-29 05:06:22:371 PDT] Sheet.getRange([2, 64]) [0 seconds]
[19-03-29 05:06:22:372 PDT] Range.setValue([https://drive.google.com/a/cnwtransport.com/file/d/1ayHoBpml__gS2w7v3w_DXj6XVo_2YmYl/view?usp=drivesdk]) [0 seconds]
[19-03-29 05:06:22:373 PDT] Range.setValue([207.0]) [0 seconds]
[19-03-29 05:06:23:370 PDT] DriveApp.getFileById([1cMCOEuRRYLYbMszLl4sYTxIxJDAZxhLBiDXAAVyQF-U]) [0.313 seconds]
[19-03-29 05:06:26:500 PDT] File.makeCopy([Template Copy]) [3.129 seconds]
[19-03-29 05:06:26:500 PDT] File.getId() [0 seconds]
[19-03-29 05:06:26:580 PDT] DocumentApp.openById([1iVIcZ2qtw1K1MKmDdgG4Lz26REEamLgLuV5tlwumCH8]) [0.08 seconds]
[19-03-29 05:06:26:580 PDT] Document.getBody() [0 seconds]
[19-03-29 05:06:26:581 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:582 PDT] Text.replaceText([%%, ]) [0 seconds]
[19-03-29 05:06:26:582 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:583 PDT] Text.replaceText([%da_email%, tariq@cnwtransport.com]) [0 seconds]
[19-03-29 05:06:26:583 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:584 PDT] Text.replaceText([%da_name%, Abdul Rasheed Makanjoula]) [0 seconds]
[19-03-29 05:06:26:585 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:586 PDT] Text.replaceText([%vat%, ]) [0 seconds]
[19-03-29 05:06:26:586 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:587 PDT] Text.replaceText([%da_address%, 5 Never never land, City of nowhere, RM12 4GG]) [0 seconds]
[19-03-29 05:06:26:587 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:588 PDT] Text.replaceText([%date%, 28/21/2019]) [0 seconds]
[19-03-29 05:06:26:589 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:589 PDT] Text.replaceText([%full_route%, Full Route]) [0 seconds]
[19-03-29 05:06:26:590 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:591 PDT] Text.replaceText([%fr_qty%, 4]) [0 seconds]
[19-03-29 05:06:26:591 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:592 PDT] Text.replaceText([%fr_price%, £120.00]) [0 seconds]
[19-03-29 05:06:26:592 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:593 PDT] Text.replaceText([%fr_subtotal%, £480.00]) [0 seconds]
[19-03-29 05:06:26:594 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:594 PDT] Text.replaceText([%half_route%, Half Route]) [0 seconds]
[19-03-29 05:06:26:595 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:596 PDT] Text.replaceText([%hr_qty%, 1]) [0 seconds]
[19-03-29 05:06:26:596 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:598 PDT] Text.replaceText([%hr_price%, £60.00]) [0.001 seconds]
[19-03-29 05:06:26:598 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:599 PDT] Text.replaceText([%hr_subtotal%, £60.00]) [0.001 seconds]
[19-03-29 05:06:26:600 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:601 PDT] Text.replaceText([%miles%, Fuel Reimbursement]) [0.001 seconds]
[19-03-29 05:06:26:602 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:603 PDT] Text.replaceText([%m_qty%, 216]) [0.001 seconds]
[19-03-29 05:06:26:604 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:605 PDT] Text.replaceText([%m_price%, £0.18]) [0.001 seconds]
[19-03-29 05:06:26:606 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:607 PDT] Text.replaceText([%m_total%, £38.88]) [0.001 seconds]
[19-03-29 05:06:26:607 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:609 PDT] Text.replaceText([%es1_desc%,  , , , , , ,]) [0.001 seconds]
[19-03-29 05:06:26:610 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:611 PDT] Text.replaceText([%es1_qty%, ]) [0.001 seconds]
[19-03-29 05:06:26:612 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:613 PDT] Text.replaceText([%es1_total%, ]) [0 seconds]
[19-03-29 05:06:26:613 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:614 PDT] Text.replaceText([%es2_desc%, Support Requested]) [0 seconds]
[19-03-29 05:06:26:614 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:615 PDT] Text.replaceText([%es2_qty%, ]) [0 seconds]
[19-03-29 05:06:26:616 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:617 PDT] Text.replaceText([%es2_total%, ]) [0 seconds]
[19-03-29 05:06:26:617 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:618 PDT] Text.replaceText([%byod_desc%, BYOD (bring your own device)]) [0 seconds]
[19-03-29 05:06:26:618 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:619 PDT] Text.replaceText([%byod_qty%, 4.5]) [0 seconds]
[19-03-29 05:06:26:620 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:621 PDT] Text.replaceText([%byod_price%, £1.80]) [0 seconds]
[19-03-29 05:06:26:621 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:622 PDT] Text.replaceText([%byod_total%, £8.10]) [0 seconds]
[19-03-29 05:06:26:622 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:623 PDT] Text.replaceText([%dart_desc%, Dartford Crossing]) [0 seconds]
[19-03-29 05:06:26:624 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:624 PDT] Text.replaceText([%dart_qty%, ]) [0 seconds]
[19-03-29 05:06:26:625 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:626 PDT] Text.replaceText([%dart_price%, £3.00]) [0 seconds]
[19-03-29 05:06:26:626 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:627 PDT] Text.replaceText([%dart_total%, ]) [0 seconds]
[19-03-29 05:06:26:627 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:628 PDT] Text.replaceText([%late_desc%, Late Departure Fee]) [0 seconds]
[19-03-29 05:06:26:629 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:630 PDT] Text.replaceText([%late_fee%, ]) [0 seconds]
[19-03-29 05:06:26:631 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:632 PDT] Text.replaceText([%bonus%, KPI / PHR Bonus]) [0.001 seconds]
[19-03-29 05:06:26:633 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:634 PDT] Text.replaceText([%bon_price%, ]) [0.001 seconds]
[19-03-29 05:06:26:635 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:636 PDT] Text.replaceText([%v_rent%, Van Rental]) [0 seconds]
[19-03-29 05:06:26:636 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:637 PDT] Text.replaceText([%vrent_price%, £200.00]) [0 seconds]
[19-03-29 05:06:26:638 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:639 PDT] Text.replaceText([%over_pay%, Over pay correction]) [0 seconds]
[19-03-29 05:06:26:639 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:641 PDT] Text.replaceText([%opay_price%, ]) [0 seconds]
[19-03-29 05:06:26:641 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:642 PDT] Text.replaceText([%pcn_desc%, Penalty Charge Notice / Admin Fee]) [0.001 seconds]
[19-03-29 05:06:26:643 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:644 PDT] Text.replaceText([%pcn_price%, £30.00]) [0 seconds]
[19-03-29 05:06:26:645 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:646 PDT] Text.replaceText([%v_dam%, Van Damage]) [0.001 seconds]
[19-03-29 05:06:26:647 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:648 PDT] Text.replaceText([%vdam_price%, ]) [0.001 seconds]
[19-03-29 05:06:26:649 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:650 PDT] Text.replaceText([%fuel_desc%, Fuel Card Usage]) [0 seconds]
[19-03-29 05:06:26:650 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:651 PDT] Text.replaceText([%fuel_price%, £91.05]) [0 seconds]
[19-03-29 05:06:26:652 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:652 PDT] Text.replaceText([%insurance%, Insurance Excess Charge]) [0 seconds]
[19-03-29 05:06:26:653 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:654 PDT] Text.replaceText([%insu_price%, ]) [0 seconds]
[19-03-29 05:06:26:654 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:655 PDT] Text.replaceText([%prop_dam%, Property Damage]) [0 seconds]
[19-03-29 05:06:26:656 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:657 PDT] Text.replaceText([%prop_price%, ]) [0 seconds]
[19-03-29 05:06:26:657 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:659 PDT] Text.replaceText([%escalation%, Escalation]) [0 seconds]
[19-03-29 05:06:26:659 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:660 PDT] Text.replaceText([%esc_price%, ]) [0 seconds]
[19-03-29 05:06:26:661 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:662 PDT] Text.replaceText([%device%, Device]) [0 seconds]
[19-03-29 05:06:26:662 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:663 PDT] Text.replaceText([%dev_price%, £50.00]) [0.001 seconds]
[19-03-29 05:06:26:664 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:665 PDT] Text.replaceText([%k_chain%, Key Chain]) [0 seconds]
[19-03-29 05:06:26:665 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:666 PDT] Text.replaceText([%kc_price%, ]) [0.001 seconds]
[19-03-29 05:06:26:667 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:669 PDT] Text.replaceText([%hi_vis%, Hi-Vis Vest]) [0.001 seconds]
[19-03-29 05:06:26:669 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:670 PDT] Text.replaceText([%hivis_price%, ]) [0.001 seconds]
[19-03-29 05:06:26:671 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:673 PDT] Text.replaceText([%earn_total%, £586.98]) [0.001 seconds]
[19-03-29 05:06:26:673 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:675 PDT] Text.replaceText([%tot_deduct%, -371.05]) [0.001 seconds]
[19-03-29 05:06:26:675 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:677 PDT] Text.replaceText([%vat_rate%, ]) [0.001 seconds]
[19-03-29 05:06:26:677 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:679 PDT] Text.replaceText([%vat_amount%, ]) [0.001 seconds]
[19-03-29 05:06:26:679 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:681 PDT] Text.replaceText([%tot_paid%, 215.93]) [0.001 seconds]
[19-03-29 05:06:26:681 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:682 PDT] Text.replaceText([%PDF Url%, ]) [0 seconds]
[19-03-29 05:06:26:683 PDT] Sheet.getRange([B2]) [0 seconds]
[19-03-29 05:06:26:942 PDT] Range.getValue() [0.259 seconds]
[19-03-29 05:06:26:943 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:26:945 PDT] Text.replaceText([%number%, 0208/2019]) [0.001 seconds]
[19-03-29 05:06:26:945 PDT] DocumentApp.openById([1iVIcZ2qtw1K1MKmDdgG4Lz26REEamLgLuV5tlwumCH8]) [0 seconds]
[19-03-29 05:06:27:215 PDT] Document.setName([Abdul Rasheed Makanjoula 0208/2019]) [0.269 seconds]
[19-03-29 05:06:27:310 PDT] Document.saveAndClose() [0.095 seconds]
[19-03-29 05:06:27:311 PDT] SpreadsheetApp.getActiveSpreadsheet() [0 seconds]
[19-03-29 05:06:27:312 PDT] Spreadsheet.getSheetByName([Settings]) [0 seconds]
[19-03-29 05:06:27:392 PDT] DocumentApp.openById([1iVIcZ2qtw1K1MKmDdgG4Lz26REEamLgLuV5tlwumCH8]) [0.079 seconds]
[19-03-29 05:06:27:393 PDT] DocumentApp.openById([1iVIcZ2qtw1K1MKmDdgG4Lz26REEamLgLuV5tlwumCH8]) [0 seconds]
[19-03-29 05:06:27:651 PDT] Document.getAs([application/pdf]) [0.257 seconds]
[19-03-29 05:06:27:756 PDT] Document.getName() [0.104 seconds]
[19-03-29 05:06:27:757 PDT] Blob.setName([Abdul Rasheed Makanjoula 0208/2019.pdf]) [0 seconds]
[19-03-29 05:06:27:757 PDT] Sheet.getRange([B3]) [0 seconds]
[19-03-29 05:06:27:757 PDT] Range.getValue() [0 seconds]

#12
[19-03-29 05:06:27:925 PDT] DriveApp.getFolderById([1lDUW8C3d7Q60gyn8b6geEozi1g9jrQx9]) [0.167 seconds]
[19-03-29 05:06:27:926 PDT] Blob.getName() [0 seconds]
[19-03-29 05:06:27:926 PDT] Blob.getContentType() [0 seconds]
[19-03-29 05:06:33:464 PDT] Folder.createFile([Blob]) [5.538 seconds]
[19-03-29 05:06:33:464 PDT] File.getUrl() [0 seconds]
[19-03-29 05:06:33:464 PDT] File.getId() [0 seconds]
[19-03-29 05:06:33:464 PDT] Sheet.getRange([3, 64]) [0 seconds]
[19-03-29 05:06:33:465 PDT] Range.setValue([https://drive.google.com/a/cnwtransport.com/file/d/1d2UpuEHNYc9SdXC2fahbcPY46dv4udMg/view?usp=drivesdk]) [0 seconds]
[19-03-29 05:06:33:466 PDT] Range.setValue([208.0]) [0 seconds]
[19-03-29 05:06:34:206 PDT] DriveApp.getFileById([1cMCOEuRRYLYbMszLl4sYTxIxJDAZxhLBiDXAAVyQF-U]) [0.238 seconds]
[19-03-29 05:06:38:295 PDT] File.makeCopy([Template Copy]) [4.088 seconds]
[19-03-29 05:06:38:295 PDT] File.getId() [0 seconds]
[19-03-29 05:06:38:486 PDT] DocumentApp.openById([1-PNjJax1mnhERjjTe4GYvr2tWwFpCIFEt9pTssFmfnU]) [0.19 seconds]
[19-03-29 05:06:38:487 PDT] Document.getBody() [0 seconds]
[19-03-29 05:06:38:488 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:489 PDT] Text.replaceText([%%, ]) [0 seconds]
[19-03-29 05:06:38:490 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:490 PDT] Text.replaceText([%da_email%, tariq@cnwtransport.com]) [0 seconds]
[19-03-29 05:06:38:491 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:492 PDT] Text.replaceText([%da_name%, Adrian Gherghe]) [0.001 seconds]
[19-03-29 05:06:38:493 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:494 PDT] Text.replaceText([%vat%, ]) [0 seconds]
[19-03-29 05:06:38:494 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:495 PDT] Text.replaceText([%da_address%, 6 Never never land, City of nowhere, RM12 4GG]) [0 seconds]
[19-03-29 05:06:38:496 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:497 PDT] Text.replaceText([%date%, 29/21/2019]) [0.001 seconds]
[19-03-29 05:06:38:498 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:499 PDT] Text.replaceText([%full_route%, Full Route]) [0 seconds]
[19-03-29 05:06:38:500 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:501 PDT] Text.replaceText([%fr_qty%, 6]) [0 seconds]
[19-03-29 05:06:38:501 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:502 PDT] Text.replaceText([%fr_price%, £120.00]) [0 seconds]
[19-03-29 05:06:38:503 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:504 PDT] Text.replaceText([%fr_subtotal%, £720.00]) [0.001 seconds]
[19-03-29 05:06:38:505 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:506 PDT] Text.replaceText([%half_route%, Half Route]) [0 seconds]
[19-03-29 05:06:38:507 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:508 PDT] Text.replaceText([%hr_qty%, ]) [0.001 seconds]
[19-03-29 05:06:38:508 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:510 PDT] Text.replaceText([%hr_price%, £60.00]) [0.001 seconds]
[19-03-29 05:06:38:510 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:512 PDT] Text.replaceText([%hr_subtotal%, ]) [0.001 seconds]
[19-03-29 05:06:38:512 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:514 PDT] Text.replaceText([%miles%, Fuel Reimbursement]) [0.001 seconds]
[19-03-29 05:06:38:514 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:516 PDT] Text.replaceText([%m_qty%, 287]) [0.001 seconds]
[19-03-29 05:06:38:516 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:517 PDT] Text.replaceText([%m_price%, £0.18]) [0 seconds]
[19-03-29 05:06:38:518 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:519 PDT] Text.replaceText([%m_total%, £51.66]) [0.001 seconds]
[19-03-29 05:06:38:520 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:522 PDT] Text.replaceText([%es1_desc%,  ,Lead Driver ,Lead Driver ,Lead Driver ,Lead Driver ,Lead Driver ,Lead Driver]) [0.001 seconds]
[19-03-29 05:06:38:523 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:524 PDT] Text.replaceText([%es1_qty%, 6]) [0.001 seconds]
[19-03-29 05:06:38:525 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:527 PDT] Text.replaceText([%es1_total%, £60.00]) [0.001 seconds]
[19-03-29 05:06:38:528 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:529 PDT] Text.replaceText([%es2_desc%, Support Requested]) [0.001 seconds]
[19-03-29 05:06:38:530 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:531 PDT] Text.replaceText([%es2_qty%, ]) [0.001 seconds]
[19-03-29 05:06:38:532 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:533 PDT] Text.replaceText([%es2_total%, ]) [0 seconds]
[19-03-29 05:06:38:533 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:534 PDT] Text.replaceText([%byod_desc%, BYOD (bring your own device)]) [0 seconds]
[19-03-29 05:06:38:535 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:536 PDT] Text.replaceText([%byod_qty%, 6]) [0.001 seconds]
[19-03-29 05:06:38:537 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:538 PDT] Text.replaceText([%byod_price%, £1.80]) [0 seconds]
[19-03-29 05:06:38:538 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:539 PDT] Text.replaceText([%byod_total%, £10.80]) [0 seconds]
[19-03-29 05:06:38:540 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:540 PDT] Text.replaceText([%dart_desc%, Dartford Crossing]) [0 seconds]
[19-03-29 05:06:38:541 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:542 PDT] Text.replaceText([%dart_qty%, ]) [0 seconds]
[19-03-29 05:06:38:542 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:543 PDT] Text.replaceText([%dart_price%, £3.00]) [0 seconds]
[19-03-29 05:06:38:543 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:544 PDT] Text.replaceText([%dart_total%, ]) [0 seconds]
[19-03-29 05:06:38:545 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:546 PDT] Text.replaceText([%late_desc%, Late Departure Fee]) [0 seconds]
[19-03-29 05:06:38:547 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:547 PDT] Text.replaceText([%late_fee%, ]) [0 seconds]
[19-03-29 05:06:38:548 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:549 PDT] Text.replaceText([%bonus%, KPI / PHR Bonus]) [0 seconds]
[19-03-29 05:06:38:550 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:551 PDT] Text.replaceText([%bon_price%, ]) [0.001 seconds]
[19-03-29 05:06:38:552 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:553 PDT] Text.replaceText([%v_rent%, Van Rental]) [0.001 seconds]
[19-03-29 05:06:38:554 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:555 PDT] Text.replaceText([%vrent_price%, ]) [0.001 seconds]
[19-03-29 05:06:38:556 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:557 PDT] Text.replaceText([%over_pay%, Over pay correction]) [0.001 seconds]
[19-03-29 05:06:38:558 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:559 PDT] Text.replaceText([%opay_price%, ]) [0.001 seconds]
[19-03-29 05:06:38:560 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:561 PDT] Text.replaceText([%pcn_desc%, Penalty Charge Notice / Admin Fee]) [0.001 seconds]
[19-03-29 05:06:38:562 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:563 PDT] Text.replaceText([%pcn_price%, ]) [0.001 seconds]
[19-03-29 05:06:38:564 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:565 PDT] Text.replaceText([%v_dam%, Van Damage]) [0.001 seconds]
[19-03-29 05:06:38:566 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:567 PDT] Text.replaceText([%vdam_price%, ]) [0.001 seconds]
[19-03-29 05:06:38:568 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:569 PDT] Text.replaceText([%fuel_desc%, Fuel Card Usage]) [0 seconds]
[19-03-29 05:06:38:569 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:570 PDT] Text.replaceText([%fuel_price%, ]) [0 seconds]
[19-03-29 05:06:38:571 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:572 PDT] Text.replaceText([%insurance%, Insurance Excess Charge]) [0 seconds]
[19-03-29 05:06:38:572 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:573 PDT] Text.replaceText([%insu_price%, ]) [0 seconds]
[19-03-29 05:06:38:574 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:575 PDT] Text.replaceText([%prop_dam%, Property Damage]) [0 seconds]
[19-03-29 05:06:38:575 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:576 PDT] Text.replaceText([%prop_price%, ]) [0 seconds]
[19-03-29 05:06:38:577 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:578 PDT] Text.replaceText([%escalation%, Escalation]) [0.001 seconds]
[19-03-29 05:06:38:578 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:579 PDT] Text.replaceText([%esc_price%, ]) [0 seconds]
[19-03-29 05:06:38:580 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:581 PDT] Text.replaceText([%device%, Device]) [0 seconds]
[19-03-29 05:06:38:582 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:582 PDT] Text.replaceText([%dev_price%, ]) [0 seconds]
[19-03-29 05:06:38:583 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:584 PDT] Text.replaceText([%k_chain%, Key Chain]) [0 seconds]
[19-03-29 05:06:38:584 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:586 PDT] Text.replaceText([%kc_price%, ]) [0.001 seconds]
[19-03-29 05:06:38:586 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:587 PDT] Text.replaceText([%hi_vis%, Hi-Vis Vest]) [0.001 seconds]
[19-03-29 05:06:38:588 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:589 PDT] Text.replaceText([%hivis_price%, ]) [0 seconds]
[19-03-29 05:06:38:589 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:590 PDT] Text.replaceText([%earn_total%, £842.46]) [0 seconds]
[19-03-29 05:06:38:591 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:592 PDT] Text.replaceText([%tot_deduct%, ]) [0.001 seconds]
[19-03-29 05:06:38:593 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:595 PDT] Text.replaceText([%vat_rate%, 0.2]) [0.001 seconds]
[19-03-29 05:06:38:596 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:597 PDT] Text.replaceText([%vat_amount%, 168.492]) [0.001 seconds]
[19-03-29 05:06:38:598 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:600 PDT] Text.replaceText([%tot_paid%, 1010.95]) [0.001 seconds]
[19-03-29 05:06:38:600 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:38:601 PDT] Text.replaceText([%PDF Url%, ]) [0 seconds]
[19-03-29 05:06:38:602 PDT] Sheet.getRange([B2]) [0 seconds]
[19-03-29 05:06:39:036 PDT] Range.getValue() [0.434 seconds]
[19-03-29 05:06:39:038 PDT] Body.editAsText() [0 seconds]
[19-03-29 05:06:39:039 PDT] Text.replaceText([%number%, 0209/2019]) [0.001 seconds]
[19-03-29 05:06:39:040 PDT] DocumentApp.openById([1-PNjJax1mnhERjjTe4GYvr2tWwFpCIFEt9pTssFmfnU]) [0 seconds]
[19-03-29 05:06:39:384 PDT] Document.setName([Adrian Gherghe 0209/2019]) [0.343 seconds]
[19-03-29 05:06:39:534 PDT] Document.saveAndClose() [0.149 seconds]
[19-03-29 05:06:39:535 PDT] SpreadsheetApp.getActiveSpreadsheet() [0 seconds]
[19-03-29 05:06:39:536 PDT] Spreadsheet.getSheetByName([Settings]) [0 seconds]
[19-03-29 05:06:39:617 PDT] DocumentApp.openById([1-PNjJax1mnhERjjTe4GYvr2tWwFpCIFEt9pTssFmfnU]) [0.079 seconds]
[19-03-29 05:06:39:618 PDT] DocumentApp.openById([1-PNjJax1mnhERjjTe4GYvr2tWwFpCIFEt9pTssFmfnU]) [0 seconds]
[19-03-29 05:06:39:712 PDT] Document.getAs([application/pdf]) [0.094 seconds]
[19-03-29 05:06:39:822 PDT] Document.getName() [0.109 seconds]
[19-03-29 05:06:39:823 PDT] Blob.setName([Adrian Gherghe 0209/2019.pdf]) [0 seconds]
[19-03-29 05:06:39:824 PDT] Sheet.getRange([B3]) [0 seconds]
[19-03-29 05:06:39:825 PDT] Range.getValue() [0 seconds]
[19-03-29 05:06:39:974 PDT] DriveApp.getFolderById([1lDUW8C3d7Q60gyn8b6geEozi1g9jrQx9]) [0.149 seconds]
[19-03-29 05:06:39:975 PDT] Blob.getName() [0 seconds]
[19-03-29 05:06:39:975 PDT] Blob.getContentType() [0 seconds]
[19-03-29 05:06:43:931 PDT] Folder.createFile([Blob]) [3.956 seconds]
[19-03-29 05:06:43:931 PDT] File.getUrl() [0 seconds]
[19-03-29 05:06:43:931 PDT] File.getId() [0 seconds]
[19-03-29 05:06:43:932 PDT] Sheet.getRange([4, 64]) [0 seconds]
[19-03-29 05:06:43:933 PDT] Range.setValue([https://drive.google.com/a/cnwtransport.com/file/d/1p3EVpWLhKRS3UVHX8QOHO0m90P6LE3Mc/view?usp=drivesdk]) [0 seconds]
[19-03-29 05:06:43:933 PDT] Range.setValue([209.0]) [0 seconds]
[19-03-29 05:06:44:606 PDT] Execution succeeded [32.992 seconds total runtime]

made this topic public #13

#14

Hey @MikeHarp we can see in the logs that the date, for some reason is coming wrong.
I’ve sent you a direct message to see if you can share this sheet with me. It would be easier and faster for debugging.


#15

Just to add some resolution here, in case someone comes looking for it. Apparently it was different timezones setup wreaking havoc on our lives.
Seems to be fixed now.
And to alter the order of the date, we simply change line 191:
invoiceDate = values.getDate() + "/" + (values.getMonth() +1 ) + "/" + values.getFullYear();


#16

Has it been changed on the template, too?


#17

Well, the best solution in my opinion is to change the script timezone as well as the sheet’s, leaving the code untouched (with no `values.getMonth() +1’).
I had the same problem and solved it altering the timezone of the Invoice Generator Script:
From the Invoice Data menu: Tools/Script Editor/
From the File menu go to Project Properties.
Go to Info tab and scroll down to TimeZone combo to change it (It defaults to Brazilian time).
After that everything works as expected.

Of course you can always change your timezone programatically with

Utilities.formatDate(new Date(data[0][12]), "GMT+5", "EEEE, dd MMM yyyy")

#18

@Ioannis_Pailas again, thanks for sharing those great instructions!