In this video, we take the Google Sheets Template and populate the data needed for an invoice using Google Apps Script. Video, Code, and Documentation can also be found at: codewithcurt.c...
Пікірлер: 201
@leahshaffer8625 Жыл бұрын
I ended up tweaking your code for a different invoice format, but this was so helpful. I tried so many different tutorials and nothing else worked. Thank you!
@CodeWithCurt4 жыл бұрын
Google Apps Script Code Used in Video Below: function AddItem() { //DEFINE ALL ACTIVE SHEETS var ss = SpreadsheetApp.getActiveSpreadsheet(); //DEFINE MENU SHEET var invoiceSheet = ss.getSheetByName("INVOICES"); var itemSheet = ss.getSheetByName("ITEMS"); //GET NEXT ROW OF INVOICE SHEET var lastrowInvoice = invoiceSheet.getLastRow() + 1; //GET LAST ROW OF ITEM SHEET var lastrowItem = itemSheet.getLastRow(); // GET VALUE OF PART AND QUANTITY var part = invoiceSheet.getRange('B13').getValue(); var quantity = invoiceSheet.getRange('B14').getValue(); // GET UNIT PRICE FROM ITEM SHEET for(var i = 2; i
@vickig.66313 жыл бұрын
for some reason I copied this code but it doesn't work on my end. i don't know what the problem is or if someone else experienced this problem. PLEASE HELP!?!?!?!
@vickig.66313 жыл бұрын
I typed the same exact code you gave us but it keeps saying "TypeError: Cannot read property 'getSheetByName' of null"
@balamuruganvijayan38183 жыл бұрын
CVV y
@dendywisana53303 жыл бұрын
Thx so much its really help me alot
@rons4503 жыл бұрын
Hey Curt, can you send me the codes? I would like to test it out. Thanks
@kevinspaeth58952 жыл бұрын
Very cool Curt! This worked like a charm. I even used more items than what you showed and the invoice came out perfectly! Thanks for taking the time how to do this and also allowing us to obtain the apps-script code. I can not wait to look at other examples you have!
@tanveerhussain38813 жыл бұрын
World's Best Teacher Best Quality Learn Easy and Understand I Love And Like All Video
@highkeyJORD2 жыл бұрын
Awesome, I've gotten into the habbit of viewing my "to-do" list as my daily schedule, so I've been wanting to populate my "customer list" and pull invoice information from there. Excited to give it a go!
@norbertdonders77892 жыл бұрын
Great video and a nice working solution. I had to change it a little bit to add the VAT but even with no knwoledge of VB I was able get this in. Many thanks!!
@DzmitryKushchanka Жыл бұрын
Thanks!
@ShardoolMehta3 жыл бұрын
Thanks for this. The code was very helpful and was my first time working on google scripts
@jeffjohnson20229 ай бұрын
Is there a way to track items sold? A way to add columns on the invoice log that records quantity and item.
@DjDryIcee4 жыл бұрын
Can you please share the code or make a template that we can copy? this will be really heplful
@ChhoteLal-tb1so4 жыл бұрын
I will provide you fully automatic GST Invoice first on trial basis. After satisfaction, you will have to pay nominal charges. Mob.:+91 9926343468.
@techrmvlogs56223 жыл бұрын
Don't Use this
@marcoangelodejucos95273 жыл бұрын
Hi Curt, Thanks for your hard work and sharing your knowledge. I tried using the code and it works perfectly fine. I also tried modifying the code such that the price for a certain item will change depending on the type of order (retail or wholesale). Now, I would like to ask if it is possible to write a code that can load a previous invoice so that I can edit or update? Thanks a lot.
@ricardocalcina23984 жыл бұрын
Quite honestly brilliant. Thanks for sharing this video!!
@christiansoglo70512 жыл бұрын
You provided great value bro. Appreciate it!
@chuahuiwen42493 жыл бұрын
Hi, I don't know where and how to copy the function code in google sheet and paste in the script?
@gabrielapulla853 жыл бұрын
Hi curt, I have the same issue, please help 🙏
@jacobloyd54952 жыл бұрын
What about adding sales tax? can you assist coding?
@steveg22772 ай бұрын
Can you expound on this a little further? Perhaps how to add a PO # or quote # field to relate the documents to each other? Very helpful tutorial!
@garymuir88053 жыл бұрын
Curt, I created an invoice generator similar to yours, within my spreadsheet I have 4 sheets, one of which is the invoice template. I want to save that template as a pdf. I have this working except for all the sheets end up in my pdf and I only want the invoice template sheet. How do I accomplish this. Thanks Gary
@garrettboulware52113 жыл бұрын
The script keeps running and exceeds the maximum execution time every time I run create invoice. I copied script line for line with no personal adjustments made so far. Any ideas how to resolve?
@geraldcavosora31773 жыл бұрын
Hi how to solved this error TypeError: Cannot read property 'getLastRow' of null
@randirandell84253 жыл бұрын
Does anybody have an answer to this question?
@yvettekristine67946 ай бұрын
Hello! Do you have a tutorial on how to automatically generate and print invoices as PDFs? Thank you.
@tallyerptutorials Жыл бұрын
Can you send this Google sheets containing all the above features?
@raytrujillo42993 жыл бұрын
Hi curt how do I get the code you have created
@WAST.3 жыл бұрын
*TypeError: Cannot read property 'getLastRow' of null* When I try to "Create Invoice", I just can't figure it out...
@analystenbgvs61253 жыл бұрын
I get the same problem
@randirandell84253 жыл бұрын
Same. Does anyone know how to fix this?
@francoisleblanc18044 жыл бұрын
Hello, could this be modified for someone who doesn’t sell items but offer a service... like a graphic designer?
@ricardocalcina23984 жыл бұрын
100% if you look at the code for the script the values are pulled by cell location in specific sheets. So changing the key titles in the print sheet and in the invoice sheet to reflect a service description rather than a product quantity is very possible
@francoisleblanc18044 жыл бұрын
@@ricardocalcina2398 Thanks man. I'm not that verse with sheets so I'm just figuring it out as I go along.
@ricardocalcina23984 жыл бұрын
Keep going bro, the docs are a good help if I ever write a blog on sheets I'll be sure to come back and drop you a link if it'll help
@paulwheeler58232 жыл бұрын
Make your items hours or materials
@TSGuideMan2 жыл бұрын
how to create direct google sheet special page PDF,print view, print button?
@richardnorris92564 ай бұрын
Great video, thanks.
@mayphookabyar-kaylee91794 жыл бұрын
Thank you so much. It worked for me
@TheLichOmoi3 жыл бұрын
huge question for me. what if I wanted the"add item" event to add the items to the right instead of to the next row?
@Kevin-qn7jf2 жыл бұрын
Great script and guide. Thank you. I was wondering if there is a way to create as an estimate, hold a copy of the estimate and save to a file, as well as convert your final estimate into an invoice as well as save a copy of the invoice to a file. Then track your revenue and taxes on your invoices on a seperate sheet?
@MarkSwansonMusic3 жыл бұрын
Thank you Curt, as a rank beginner I was able to learn how to use this invoice and get things up and running! One thing, I would love to be able to add a field that would calculate sales taxes. Any chance of that? A field that would add 6% sales tax on the subtotal on the INVOICES page would do it.
@paulobarbosa32993 жыл бұрын
Hello, Can you help me please ?
@nobledistributinginc.78232 жыл бұрын
did you figure this out?
@koperasibalai26603 жыл бұрын
Hi Curt, I 've execute the script as your vid. but it turns out the addItem function did not resulting to new row on the INVOICES table. and also, the on the PRINT tabs, there are 1000 lines of empty line not truncated. how can I fix this?
@wernerboshoff25212 жыл бұрын
I don't know anything about scrip programming but I assume one can not customize the customer information and the invoice do to that the scrip uses very specific sells. Is that correct?
@kyawhtoolinbenjamin6923 жыл бұрын
Hello Sir, Thank you very much for the tutorial. I have made some changes to my invoice format and it is working well. However, I would like to ask if we are able to log the items invoiced as well?
@originalbasswarrior3 жыл бұрын
When you are subtracting the adjustment " var totalInvoice = subTotal - adjustment;" that should be subTotal + adjustment otherwise when you put a negative adjustment it adds the amount, subtraction of a negative is addition. It is right on the print invoice since that is generated by the sheet function but it is wrong in the invoice log.
@jessicadavis17223 жыл бұрын
i can not find the code in the comments, are they still here? can someone please help me TIA
@HarshadB-y6v Жыл бұрын
Great work. Can we wrap form around this utility
@rodrigaosales813 жыл бұрын
Curt can you share the scrip code? Or you help me for some charges?
@gilmarmartinez2 жыл бұрын
First of all, I want to say that this video is very well documented! After watching this I checked out all your videos and they do not disappoint, excellent job. I have one question, when I am in the INVOICE tab and enter either an item or a QTY from b13 or b14, I am forgetting to click enter or tab or click away from the cell, so the cell commits with the value. Is there a "prescript" to run so in case I forget to do that, it can click out of the cell? Thank you in advance.
@arifzainal86942 жыл бұрын
Same here, please need a solution
@rrheatingairconditioningin56883 жыл бұрын
how do you copy the script code?
@Kevin-qn7jf2 жыл бұрын
If you have not figured this out, and are still interested, you can look below the video, select Show More, it will expand and the link will then be visible.
@AliveBoldTV Жыл бұрын
This tutorial is super helpful however, I'm very nervous giving access to the script to be able to delete all my spreadsheets and access my docs. Is that standard?
@Mason72782 жыл бұрын
I have footer,how to automatically combine ?
@paulobarbosa32993 жыл бұрын
Full code link please ? Its Impossible to see all the code...
@DynamicEmpireInc4 жыл бұрын
Also brother is there any way you could add state sales tax to the total price
@Ashok-mh2df4 жыл бұрын
I have a doubt? Can i create a button with function print? and as well as save in drive with specific name? Help me with this
@clashoflions73394 жыл бұрын
*Hello Curt, how can I make sure that accidentally clicking twice those drawings doesn't get me to the window that is to change those. You see I am a very impatient person that happens a lot with me. I often click fast and more than once and end up to that window and its really annoying.*Is there a solution for me?*
@nobledistributinginc.78232 жыл бұрын
Can you help me? Everything you did is working great for me but I want to add HST which is based on if item is in a range named taxable on items sheet. if item on invoice Sheet is in range taxable from itemSheet then I want qty*unit price to be multiplied by .15 to get tax
@wernerboshoff25212 жыл бұрын
where is the code to paste into the script editor?
@lindseyscott Жыл бұрын
The code is listed at the website in the description
@joshcocca83913 жыл бұрын
Can you put the code in the description box instead? I can't find it. I've sorted by newest and still can't find it anywhere.
@haziqqahjahidin54964 жыл бұрын
Service Spreadsheets failed while accessing document with id 1e2P-7aW-i-aFCuOXjL6K4MzSI2Xp-SQfog_85_8H55I. This error prompt out when I clicked the Add Item button. Could you help?
@CodeWithCurt4 жыл бұрын
Below is the Add Item Function from the Video. See if this helps. function AddItem() { //DEFINE ALL ACTIVE SHEETS var ss = SpreadsheetApp.getActiveSpreadsheet(); //DEFINE MENU SHEET var invoiceSheet = ss.getSheetByName("INVOICES"); var itemSheet = ss.getSheetByName("ITEMS"); //GET NEXT ROW OF INVOICE SHEET var lastrowInvoice = invoiceSheet.getLastRow() + 1; //GET LAST ROW OF ITEM SHEET var lastrowItem = itemSheet.getLastRow(); // GET VALUE OF PART AND QUANTITY var part = invoiceSheet.getRange('B13').getValue(); var quantity = invoiceSheet.getRange('B14').getValue(); // GET UNIT PRICE FROM ITEM SHEET for(var i = 2; i
@haziqqahjahidin54964 жыл бұрын
Code With Curt this is the exact code that i typed. Still prompted the same msg. Is there another solution?
@qfingers10 Жыл бұрын
Thank you for posting your tutorial videos. They are extremely informative and helpful. But how do I contact you about an issue that I'm having with one of the tutorials? I followed everything you did let her for letter and I'm getting an error message!
@shanabbas3 жыл бұрын
where is the code can you plz attach a link I couldn't find codes when i click on sort by and select newest first
@erikabimbel62892 жыл бұрын
How do I make the invoice number to contain only 3 number Column exp. THG-000 and going up from there with only changing the 0 and not going into the thousand place if that makes sense
@manco_yt_xd5985 Жыл бұрын
hi i used it but i did modification on the names of some function and its stopped working correctly can you give me some advice on how to modify it whit out affecting the scrip codding hope you can i would really appreciated
@keichungwong92674 жыл бұрын
Hello, could this invoices bulk PDF automatically after creating invoice?
@jaffetay72683 жыл бұрын
Curt, may i key in data in invoices page, it auto link to my sales invoice record?
@tonisanchez-zl1eq Жыл бұрын
My sheet isn't coping into my script. It just copies a few words can you please help me.
@vickig.66313 жыл бұрын
What is the script code?
@bethforeman41513 жыл бұрын
How can I do a percentage for an adjustment? Thanks!
@haithamalmaaini432 жыл бұрын
i tried to authorize the script but error message keeps coming saying This app is blocked This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access.
@timwebberson3753 жыл бұрын
So i noticed when you put in an adjustment, like your -2 in your example here, it actually adds the 2 not subtracts it on the total on the invoice log page. So instead of saying 878 like your invoice shows, it says 882. Is there anyway to adjust the code so the invoice log accurately reflects discounts? Thanks for the awesome video!
@CodeWithCurt3 жыл бұрын
Good Catch! In the code where is states: var totalInvoice = subTotal - adjustment; Change to: var totalInvoice = subTotal + adjustment; I updated the code in the comments with the change.
@timwebberson3753 жыл бұрын
@@CodeWithCurt great thank you! I ended up messing around and found that. Thanks for having the code in the comments. Been looking for a great way to make invoices and this was it!!
@backstageeffects3 жыл бұрын
I found this mistake works good for adding a shipping cost, I renamed the button to "shipping". However I do have an issue where the quantity does not post most of the time. Please reply...
@KevinWinegar-c1i9 ай бұрын
Where did you copy the formulas from? You jumped over that!
@tovs7163 жыл бұрын
No matter what I do I can't get it to input the customer's name and address. What am I doing wrong?
@poodek74513 жыл бұрын
is there anywaay to add a vat calculation and a delivery charge onto this ?
@revathiguguloth39904 жыл бұрын
Hi, how can I get total items sold per day and their quantity sold same as invoice log.
@mayphookabyar-kaylee91794 жыл бұрын
Hi curt, I also wanted to ask how can i check the details of the invoice that i have done before. Like the print sheet, the items, quantities, and all.
@CodeWithCurt4 жыл бұрын
This doesn't store the print sheet. The thought behind the software was just to print it off for record keeping. It does have a log to summarize what Invoices were created.
@clashoflions73394 жыл бұрын
You can save the file on excel and put it on a folder.
@JasvirSingh-wr4qe3 жыл бұрын
thanks very useful. I want to add image also example: ITEM, QTY, IMAGE(have image in cell ), UNITPRICE. getting "Exception: Service error: Spreadsheets" tried some changes in script too. can you help in this
@michaelgerwing50573 жыл бұрын
Right arm man thank alot
@SurajitBhakta4 жыл бұрын
Can you please share the code? It would have been helpful. Writing the code from seeing the video is difficult. Thanks in advance.
@EvanSuper4 жыл бұрын
Why don't you try RapidBooks? Professional Invoice Maker. Free and very easy to use.
@SemSeim3 жыл бұрын
Hey very nice video. One question, how could I define another currency? Thanks you.
@MrBojangles-mk2sy3 жыл бұрын
How come I set it up on the computer but it's not functioning on the app?
@ChhoteLal-tb1so4 жыл бұрын
Sir, I also request you to teach, to create alert Messages reminding to fill, if any invoice range/cell is left out to fill.
@hinaliaqat70332 жыл бұрын
I copied the code but it is giving error now. what to do
@wernerboshoff25212 жыл бұрын
where did you get the code to copy?
@mohamed.montaser4 жыл бұрын
can you make a video on how to increment id when a column is not blank
@slay112284 жыл бұрын
How do I start? Im not that good with computers but willing to learn
@BarbaraWesterman2 жыл бұрын
How do I add "Note" to the Invoice Log please
@glendaortiz8143 Жыл бұрын
Your videos are very good. However, I already have some VBA Macros created, but tried to put them into Google Sheets and are not working properly. Can you help me convert them into Google Sheets? Where can I contact you directly so you can help. Thanks
@slay112284 жыл бұрын
How do I customize this to my own things?
@mayphookabyar-kaylee91794 жыл бұрын
i wanted to ask a question, I don't want the dollar sign because i want to use kyats instead. How do I remove it?
@CodeWithCurt4 жыл бұрын
On the Google Sheet Select 'Format' Tab Select 'Number' It is probably set to Currency. You can switch it to a different currency.
@mayphookabyar-kaylee91794 жыл бұрын
@@CodeWithCurt thank you so much
@vishalgadhavi25282 жыл бұрын
@@CodeWithCurt please provide sample tamplets
@willemnorval28334 жыл бұрын
Hi Curt, please provide me with the fully automatic GST Invoice first on trial basis.
@DynamicEmpireInc4 жыл бұрын
Once I click create I get a Message details saying TypeError: Cannot read property 'getLastRow' of null ..What does this mean and how can I fix it?
@CodeWithCurt4 жыл бұрын
It could be that your sheet name isn't matching what is in the code.
@jessejob43574 жыл бұрын
Hey bro this actually is the issue beware of spacing when defining the Menu sheet, if your sheet name has a spacing on the end of it it will affect the get last row.
@nssdesigns3 жыл бұрын
Am I missing something BUT where is the link to the code?
@cheeese32903 жыл бұрын
What about taxes?
@llaurence4093 жыл бұрын
I can't find the code :( Please share it again.
@BarbaraWesterman3 жыл бұрын
This is a great script. How do I remove the words 'Submitted to ' from the script, would prefer just the date!
@Kevin-qn7jf2 жыл бұрын
I might be wrong, but what you could do is type two // in front of line 116 and that would remove it from the code, you could later just delete those / and it would work again. Save it, try this, and if it works your good. The other option is to make a backup of the code as he wrote it, edit that line out, check to make sure it still works. hope this helps
@paulcedriccaturay5324 жыл бұрын
hello i am getting an error which says: Exception: The parameters (number,number) don't match the method signature for SpreadsheetApp.Sheet.insertRowAfter. after executing function createInvoice. can someone help me?
@CodeWithCurt4 жыл бұрын
It looks like the code below is getting stuck. It is saying you are not passing (number, number) for insertRowsAfter. I am not sure what value you are passing for z. var z = 0; var subTotal = 0; for(var y = 17; y
@ilikeITcomshop2 жыл бұрын
i got this TypeError: Cannot read property 'getLastRow' of null...can you help me please
@pamhinze86202 жыл бұрын
Having the same issue. How do you fix?
@guyfreeman-pow12362 жыл бұрын
check my other comment
@sd_diver6199 ай бұрын
Man I’ve spent like 6 hrs trying to figure out how to UNBOLD the FONTS of the description rows and failed….wonder if you can help a rookie here.😅😡
@theguybrandon Жыл бұрын
Slow down curt lol I’m trying to keep 😂
@yasinbhuiya6284 Жыл бұрын
TypeError: Cannot read properties of null (reading 'getLastRow'). HOW TO SOLVED IT, IT CAN NOT WORKING.
@rodfedalto Жыл бұрын
Check the name of the tabs and make sure they're exactly the same in your code.
@precisionfab80393 жыл бұрын
NOT ABLE TO GET OUT PUT .... SCRIPT IS KEEP ON RUNNING
@adrianrobertshaw85342 жыл бұрын
All great until you want to add a new customer and new item... you will have to do a double entry for every new client and every new item..
@shafiqtuhin79414 жыл бұрын
You haven't assign invoicelog function to any button. Can't understand how it worked.
@CodeWithCurt4 жыл бұрын
The function is being called within the createInvoice Function.
@shafiqtuhin79413 жыл бұрын
@@CodeWithCurt thank you very much for your clarification.
@abelinogomez12244 жыл бұрын
how do you generate the invoice number?
@CodeWithCurt4 жыл бұрын
It is generated from the SETTINGS sheet. I increment that number every time a invoice is created. It is in function createInvoice() Lines: var invoice_number = settingSheet.getRange(1,2).getValue(); var next_invoice_number = invoice_number + 1; settingSheet.getRange(1,2).setValue(next_invoice_number); I hope this helps.
@clarencementor48622 жыл бұрын
Amazing
@ChhoteLal-tb1so4 жыл бұрын
Sir, I shall be very grateful, if you teach to combine two or more functions in a Single Button. Suppose 'createInvoice' and 'clearInvoice' in a single button. Means, how to break these functions and assign a single button.
@CodeWithCurt4 жыл бұрын
You can call a function within a function. Assign the firstTask() function to a button. function firstTask() { secondTask(); } function secondTask() { }
@asambleacristiana65522 жыл бұрын
hi, great video!, can u share the sheet template?
@poodek28753 жыл бұрын
has anyone succesfully added a vat amount working into this code please ?
@audrapotaka99152 жыл бұрын
How do i paste all my script coding
@nobledistributinginc.78232 жыл бұрын
just copy it, right click and paste it where you want it
@SHELLY-k8m4 ай бұрын
NICE
@hansaliya3 жыл бұрын
It was No need to fast forward all other thing we where learning from it