Google Sheets Purchase Order Generator: Using Purchase Order Template and Google Apps Script

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ก.ค. 2020
  • In this video, we take the Google Sheets Template and populate the data needed for a Purchase Order using Google Apps Script.
    Video, Code, and Documentation can be found at:
    codewithcurt.com/how-to-creat...

ความคิดเห็น • 74

  • @CodeWithCurt
    @CodeWithCurt  3 ปีที่แล้ว +11

    Google Apps Script Code in Video Below:
    function AddItem()
    {

    //DEFINE ALL ACTIVE SHEETS
    var ss = SpreadsheetApp.getActiveSpreadsheet();

    //DEFINE MENU SHEET
    var poSheet = ss.getSheetByName("POS");
    var itemSheet = ss.getSheetByName("ITEMS");

    //GET NEXT ROW OF PO SHEET
    var lastrowPO = poSheet.getLastRow() + 1;

    //GET LAST ROW OF ITEM SHEET
    var lastrowItem = itemSheet.getLastRow();

    // GET VALUE OF PART AND QUANTITY
    var part = poSheet.getRange('B13').getValue();
    var quantity = poSheet.getRange('B14').getValue();

    // GET UNIT PRICE FROM ITEM SHEET
    for(var i = 2; i

  • @AIAnimation09
    @AIAnimation09 2 ปีที่แล้ว

    No one youtuber seen good as you, You explain well and provide all the needs to a programmer and learner and needed person, heartly Salute to you sir

  • @anastassiyaeley5036
    @anastassiyaeley5036 ปีที่แล้ว

    Hi, thanks for the super useful and clearly explained video! The only issue I have is that for some reason the total price does not compute on PRINTPO, but the rest of the script works fine.

  • @juandigregorio2544
    @juandigregorio2544 3 ปีที่แล้ว

    Thank you for this great tool, one question, in case I would like to store on the PO LOG the list of items purchased to run some analytics, how can I do that? if there is another way of analyzing this also open to suggestions. Regards!

  • @SnapRolls
    @SnapRolls 2 ปีที่แล้ว

    Great video and thanks for the script, buddy! Is it possible to add the order details with item name and qty in the PO log for each PO?

  • @dustinjohnson765
    @dustinjohnson765 2 ปีที่แล้ว

    Curt - thank you so much. This is great. I am hoping you can help guide me through one additional coding. My product has the same Item Name but different description. I was hoping you could help me add/recode the portion of the code that pulls the unit price. I was wanting to have the code look at item and then description and pull the price based on those two variables. Is that possible?

  • @sal_amat498
    @sal_amat498 ปีที่แล้ว

    Hey Curt how about logging PO including all the Items, like your retrieving the Items in the PO?

  • @medooegy5263
    @medooegy5263 2 ปีที่แล้ว

    Thank you so much, really useful. One question, is it possible to use payment gates in google web apps?

  • @jeggerralegre8243
    @jeggerralegre8243 2 ปีที่แล้ว

    Super need this knowledge

  • @esanariam
    @esanariam 3 ปีที่แล้ว +1

    Thanks, great Video!! and is it possible to add code to keep track of the items ordered with PO, Vendor, order by, etc?

  • @bulbulahmed3098
    @bulbulahmed3098 2 ปีที่แล้ว

    Excellent

  • @vikisdwl
    @vikisdwl ปีที่แล้ว

    If I want to transfer data from sheet PO print to PO Log by item by item, how can I do it? That is, if PO has 5 items, I needs 5 rows in PO log and each row is different based on item but other information (e.g., vendor name, PO number, issue date) are similar. Thanks you

  • @AIConversations76
    @AIConversations76 ปีที่แล้ว

    while adding item B17 is coming with no value but for succesive addition of item B18,b19,... are show ing qty ,only B17 no entery is coming after adding

  • @ChibiBlackii
    @ChibiBlackii 3 ปีที่แล้ว

    is there a way to get the sheet from you without needing to make my own i dont know how to fix the error i kept popping up when i tried to get ready to get the script on

  • @NamHaVblog
    @NamHaVblog 3 ปีที่แล้ว

    thanks

  • @gujjubhai_finance3510
    @gujjubhai_finance3510 3 ปีที่แล้ว +3

    Can you please share this Google sheet for copy

  • @dinoferrari3949
    @dinoferrari3949 3 ปีที่แล้ว

    PO total in PO Log does not reflect the tax and shipping

  • @waqaskhan440
    @waqaskhan440 3 ปีที่แล้ว

    Which version is suitable for this

  • @dolfdolf
    @dolfdolf 2 ปีที่แล้ว

    will this be able to save the data base of the order??

  • @markchandler2299
    @markchandler2299 ปีที่แล้ว

    I'd very much like to use this in my office. Are you selling the completed version you created?

  • @eduverme2
    @eduverme2 3 ปีที่แล้ว

    Can I send this PRINT PO to an email with a confirmation button??

  • @binamshakya5240
    @binamshakya5240 3 ปีที่แล้ว

    Thank you for the video. Appreciate it. Btw is there any way to change the currency. I managed to change in the print PObut couldn't change where unit price is generated in POS.

    • @digiworld7877
      @digiworld7877 ปีที่แล้ว

      go to script and and go to line no: 35
      setNumberFormat("$#,###.00");
      change this to
      setNumberFormat("₹#,###.00");

  • @gkennethkarl
    @gkennethkarl 3 ปีที่แล้ว

    do u have a work order or job order generator?

  • @michaelv2299
    @michaelv2299 ปีที่แล้ว

    Hi there, new version of sheets does not show the code 😢

  • @shawndraproducts
    @shawndraproducts 3 ปีที่แล้ว +1

    HI Curt, Would it be possible to share the code for this?

  • @digiworld7877
    @digiworld7877 ปีที่แล้ว

    Hello sir kudos to you
    i get an error while add item, unit price showing indivisual instead of showing multiply by qty
    please asnwer iam stuck on a project

  • @Narindersingh-ns7uv
    @Narindersingh-ns7uv 11 หลายเดือนก่อน

    where to check previously made p.o

  • @user-lf7tq7qq9p
    @user-lf7tq7qq9p ปีที่แล้ว

    Will you share this spreadsheet or is it available for purchase

  • @TheWDQ7201
    @TheWDQ7201 5 หลายเดือนก่อน

    @codeWithCurt I am getting this error message and I am not sure why? ReferenceError: companyName is not defined

  • @markpoirier4672
    @markpoirier4672 ปีที่แล้ว

    Hey Curt or anyone else, I'm confused at 10:50 of the video when you copy in the code? where do you get this?

    • @MelKate07
      @MelKate07 ปีที่แล้ว

      There’s a link in the video description that takes you to his website, you can copy the code from there

    • @markpoirier7481
      @markpoirier7481 ปีที่แล้ว

      @@MelKate07 Yes thank you. I found it and tried to work through the script but am getting lots of errors because I am changing Curt's Purchase Order template. I do not write script so I'm a little confused.

  • @gportillo16
    @gportillo16 3 ปีที่แล้ว

    Hi Curt, can be possible to send the info to a separate LOG spreadsheet? and how?

    • @CodeWithCurt
      @CodeWithCurt  3 ปีที่แล้ว

      You could open your spreadsheet by URL. The URL of the spreadsheet. Then set the spreadsheet as active. Then declare your sheet.
      var ss = SpreadsheetApp.openByUrl(
      'docs.google.com/spreadsheets/d/abc1234567/edit');
      SpreadsheetApp.setActiveSpreadsheet(ss);
      var nameSheet = ss.getSheetByName('SHEETNAME');

  • @fabulover1
    @fabulover1 2 ปีที่แล้ว

    Hello, everything is functioning correctly, but something I did to the sheet is now affecting the quantities added when I click the add items button. Cell C17 doesn't grab the quantities at all, and the cells after in Column C the quantities are off. Not grabbing the correct quantities I entered in Cell B14, seems to be deducting units?? Any advice? Or start over?

    • @tonypayson8306
      @tonypayson8306 3 หลายเดือนก่อน

      I'm experiencing the same issue. Everything else seems to be working up to that point.

  • @shawndraproducts
    @shawndraproducts 3 ปีที่แล้ว +1

    Can you share the apps script code?

  • @isaiassaavedra4067
    @isaiassaavedra4067 3 ปีที่แล้ว

    Hello Curt, Great Video thank you for sharing. I follow step by step all the video's instruction and at the end it didn't run. I got a bunch of red comments like this. TypeError: Cannot read property 'getRange' of null (line 211, file "Code") TypeError: Cannot read property 'getLastRow' of null (line 12, file "Code")Dismiss TypeError: Cannot read property 'getRange' of null (line 210, file "Code")Dismiss. Can you kindly help?

    • @CodeWithCurt
      @CodeWithCurt  3 ปีที่แล้ว

      Make sure the Google Sheet names match up exactly from the video

  • @noliotara6838
    @noliotara6838 3 ปีที่แล้ว

    can you share your sheet?

  • @ezrazulueta1919
    @ezrazulueta1919 2 ปีที่แล้ว

    Hi I follow the step by step on how you create the sheets, but when I click the add item there is a context that appears in my screen that says a TypeError: Cannot read property 'getLastRow' of null, so I do I need to do to fix it thank you.

    • @fabulover1
      @fabulover1 2 ปีที่แล้ว

      Hello Ezra, did you ever get an answer ? I don't see or find an response back. I'm having the same issue too

    • @fabulover1
      @fabulover1 2 ปีที่แล้ว +1

      Hello Ezra, I was able to fix the same error message you received. If you need further details on how to fix, let me know.

    • @Fapner
      @Fapner 2 ปีที่แล้ว

      @@fabulover1 how did you fix this error?

    • @admindare3984
      @admindare3984 2 ปีที่แล้ว

      @@fabulover1 can you advise how you fixed this error? Thank you

    • @admindare3984
      @admindare3984 2 ปีที่แล้ว

      Turns out I has a space at the end of my sheet name!!

  • @varunbahuleyan7360
    @varunbahuleyan7360 3 ปีที่แล้ว

    When i do this i am getting type error and it is with getlastrow null details

    • @CodeWithCurt
      @CodeWithCurt  3 ปีที่แล้ว

      Do you know the statement it is getting the error from.

  • @CarlosMartinez17
    @CarlosMartinez17 2 ปีที่แล้ว +1

    Hello. Is there a link to download (copy) the file ?
    Thanks

    • @georgeyoung7248
      @georgeyoung7248 2 ปีที่แล้ว

      Indeed. It's faster for me to just open the file and see if it does what I want, copy scripts and functions, etc, rather than watching a 23 minute video about how to do it.

    • @SnapRolls
      @SnapRolls 2 ปีที่แล้ว

      You do see the script in the video description? I think for a function and script that you're getting for free, you gotta be ready to put in some effort and at least create the spreadsheet yourself, buddy.

  • @ashleellambert
    @ashleellambert 3 ปีที่แล้ว

    Hi Curt, do you have a suggestion or if possible for the purchase order once generated could automatically be PDF and then put in a google folder?

    • @ashleellambert
      @ashleellambert 3 ปีที่แล้ว

      Also is there a way to make
      This iPad capable?

  • @pitadomingos9934
    @pitadomingos9934 2 ปีที่แล้ว

    May I have the code?

  • @abirghosh115
    @abirghosh115 3 ปีที่แล้ว

    Hello Curt, Great Video! I tried all step by step, Clear PO and Add Item script is working perfectly well. But getting error while creating PO, "TypeError: Cannot read property 'getLastRow' of null
    at createPO(Code:88:33)
    Can you please help?

    • @CodeWithCurt
      @CodeWithCurt  3 ปีที่แล้ว

      Make sure the Sheet Names match up with the Apps Script

  • @thomasskaggs2904
    @thomasskaggs2904 3 ปีที่แล้ว

    I know nothing about google script and have coded anything in about 30 years. Tried to copy past this script but when I go to save I get an error msg "Syntax error: SyntaxError: Unexpected token '}' line: 37 file: Code.gs" ("are mine) Line 37 is a right side bracket with a red underline. This is at the end of the // populate PO sheet. Please help an old fart

    • @thomasskaggs2904
      @thomasskaggs2904 3 ปีที่แล้ว +1

      I found the problem. There is a missing bracket on the Populate PO Sheet section

  • @saurabhsingh2512
    @saurabhsingh2512 2 ปีที่แล้ว

    HI Its giving me the error on "Create PO" button TypeError: Cannot read property 'getLastRow' of null

    • @admindare3984
      @admindare3984 2 ปีที่แล้ว

      Did you get an Answer? I have the same issue and for the life of me, I can't fix it! I have found that this is the Code issue but really need help: var lastrowPrint = printSheet.getLastRow();

    • @admindare3984
      @admindare3984 2 ปีที่แล้ว

      Turns out I had a space at the end of my sheet name

  • @varunbahuleyan7360
    @varunbahuleyan7360 3 ปีที่แล้ว

    How can i clear it

    • @CodeWithCurt
      @CodeWithCurt  3 ปีที่แล้ว

      The next PO will replace the previous PO.

  • @shivdayalupadhyay6532
    @shivdayalupadhyay6532 3 ปีที่แล้ว

    Give me link to download this sheet

    • @CodeWithCurt
      @CodeWithCurt  3 ปีที่แล้ว

      I posted the code in the comments.

  • @dmemsl5278
    @dmemsl5278 2 ปีที่แล้ว

    Please share me Script. its help for me

  • @everythinggirlzlove8698
    @everythinggirlzlove8698 ปีที่แล้ว

    DOESNT WORK, DONT WASTE YOUR TIME

  • @doctorstat2791
    @doctorstat2791 3 ปีที่แล้ว

    If I want to transfer data from sheet PO print to PO Log by item by item, how can I do it? That is, if PO has 5 items, I needs 5 rows in PO log and each row is different based on item but other information (e.g., vendor name, PO number, issue date) are similar. Thanks you

    • @mrbillion2074
      @mrbillion2074 3 ปีที่แล้ว

      Bro did u manage to figure out. I need the formula on this. Can anyone help? Pls thanks

    • @vikisdwl
      @vikisdwl ปีที่แล้ว

      hi, did you got the solution?

    • @vikisdwl
      @vikisdwl ปีที่แล้ว

      @@mrbillion2074 you got?