Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2016
    Posts
    12
    Provided Answers: 1

    Answered: Split in multiple records

    Hello all, I kindly want help for the following: I made a complete sales system for a glass company, we have quotations, then are converted into orders when confirmed and finally into invoices, when products are ready. The problem is that the invoices are printed on preprinted forms, so have limited detail lines only 15, and most of our quotations include more than 15 lines. I can limit the quotation to 15, but my manager doesnot accept it. I hope someone can give me an idea how to get this done. Thank you very much. Regards, Ernesto

  2. Best Answer
    Posted by MacHeuS

    "
    Code:
    [$n]=0
    For Each Record From [$productosenorden]
      [$n]=[$n]+1
      DetalleOrdenes: [linea] = [$n]
    Next item

    Try this. $n = mathematic formula varible (no text)"


  3. #2
    Join Date
    Jul 2011
    Posts
    176
    Quote Originally Posted by mecm View Post
    The problem is that the invoices are printed on preprinted forms, so have limited detail lines only 15, and most of our quotations include more than 15 lines. I can limit the quotation to 15, but my manager doesnot accept it.Regards, Ernesto
    Ernesto,
    I am not clear in understanding your qustion. However if the pre-printed form has limitaions, is it Ok for your manager if the details are curtailed on print. If that is OK you can format the detail field creating a dummy field (for number of characters) and print that dummy field instead of actual field.

  4. #3
    Join Date
    Feb 2016
    Posts
    12
    Provided Answers: 1
    Hello Asokram. Thank you for your help.
    I am afraid I cannot use a multiline field, because the preprinted invoice has corresponding columns: Code, Quantity, Description, Unit Price, Total. So I cannot make a big paragraph which is a great idea.
    The problem is the following:
    I have an order that has too many detail lines that I have to Split into several invoices, for example the order has 60 detail lines and the preprinted invoice allows only 15 detail lines, so I have to make 4 invoices in this example.
    On the script to create the invoice, I first create a recordset based on the detail: [$orderdetail] and what I want to do is set a value to a field [LineNr] of each record of this recordset with the line number, so that then it is easy for me to make new recordsets based on [$orderdetail] recordset, for example [$od1] for [LineNumber] 1 to 15; [$od2] for lines 16 to 30 and so on.
    So my asked help is how to fill the line value into the field [LineNr] of the recordset [$orderdetail]? Starting with line 1 to n?
    Thank you very much for any valuable help.
    Best regards,
    Ernesto

  5. #4
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    Try to divide your record in new folder to multiple records. Print this new records... Is it possible???

    Click image for larger version. 

Name:	SAMPLE.JPG 
Views:	26 
Size:	68.2 KB 
ID:	16895
    I do not know English well. I am using Google Translate for translation. Please do not laugh my sentences.

  6. #5
    Join Date
    Feb 2016
    Posts
    12
    Provided Answers: 1
    Hello MacHeuS,
    Thank you for your message. English is also not my native language, don't worry.
    The picture that you sent is what I want to do. My question is how to get records from lines and Split into lines1, 2 and 3.
    I don't know how to script this using the For each statement. Have tried to filter with query from recordset but did not find any way to filter per line Id.
    Thank you again for your help.
    Regards,
    Ernesto

  7. #6
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    Send screen shot of that window soo we understand what does it look like.

  8. #7
    Join Date
    Feb 2016
    Posts
    12
    Provided Answers: 1
    Hello MacHeuS,
    Attached please find screen shot of the orders folder and the script that I am working to make the invoice(s) from the orders. I need help with the for each statement. Hope someone can help me here (lines 2 to 6). I have an empty field [línea] that I want to fill with the corresponding number according to the detail.
    Recordset variable name:[$productosenorden]
    Thank you very much,
    Ernesto

    Click image for larger version. 

Name:	foreach.png 
Views:	25 
Size:	127.8 KB 
ID:	16896Click image for larger version. 

Name:	Orders.png 
Views:	24 
Size:	74.5 KB 
ID:	16897

  9. #8
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    Code:
    [$n]=0
    For Each Record From [$productosenorden]
      [$n]=[$n]+1
      DetalleOrdenes: [linea] = [$n]
    Next item

    Try this. $n = mathematic formula varible (no text)
    I do not know English well. I am using Google Translate for translation. Please do not laugh my sentences.

  10. #9
    Join Date
    Feb 2016
    Posts
    12
    Provided Answers: 1
    Hello MacHeuS,
    Thank you very much for your valuable help. It worked as expected.
    Best regards,
    Ernesto Corzo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •