Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi Guys, wondering if you could check over this script. I have an job order i need to converted to an invoice. I can get most of except, these invoices are created by the user selecting which items from the job order to be invoiced. Again no problem. what I am trying to do is warn the user that if they select an item already invoiced, please try again. But I am stuck. The first check is to see if they want to create a second invoice most time they do.

==Create Invoices==: Create Invoices

#

Allow User Abort[ Off ]

Set Error Capture [ On ]

#

If [ Invoices_From_Jobs::id_joborder ]

Show Custom Dialog[ Title: "Transfer Error"; Message: "An INVOICE has already been made for this Job Order. Would you like another

INVOICE made?"; Buttons: “Yes”, “Cancel” ]

If [ Get ( LastMessageChoice ) = "2" ]

Exit Script [ ]

End If

End If

Set Variable [ $id_jo; Value:JobOrders::ID_JOBORDER ]

Set Variable [ $flag_line_items; Value:Job_Order_Line_Items::id_constant ]

Set Variable [ $jocalc; Value:JobOrders::JobOrderNoCalc ]

Set Variable [ $inclinv; Value:"Y" ]

#

#1.Cust Info

Set Variable [ $c_id; Value:JobOrders::id_contact ]

#

Go to Layout[ “Invoices_From_Jobs” (Invoices_From_Jobs) ]

New Record/Request

Set Variable [ $id_inv; Value:Invoices_From_Jobs::ID_Invoice ]

#

#Cust Info - Jobs

Set Field[ Invoices_From_Jobs::id_contact; $c_id ]

Set Field[ Invoices_From_Jobs::JobOrderNumberCalc ; $jocalc ]

#--------------------------------------Transfer Line Items

If [ $flag_line_items = 1 ]

// New Window [ Name: "Transferring Line Items...Part 2"; Height: 50; Width: 200; Top: 50; Left: 50 ]

// New Window [ Name: "Transferring Line Items"; Height: 50; Width: 200; Top: 50; Left: 50 ]

Go to Layout[ “Job Order Line Items - Maintenance” (Job_Order_Line_Items) ]

Enter Find Mode [ ]

Set Field[ Job_Order_Line_Items::id_joborder ; $id_jo ]

Set Field[ Job_Order_Line_Items::incl_invoice ; $inclinv ]

Perform Find[ ]

If [ Get (FoundCount) = 0 ]

Exit Script [ ]

End If

Go to Record/Request/Page

[ First]

Loop

#--------------------------------------Set variables with line item info

Set Variable [ $lineid; Value:Job_Order_Line_Items::ID_LineItem ]

Set Variable [ $desc; Value:Job_Order_Line_Items::Description ]

Set Variable [ $quantity; Value:Job_Order_Line_Items::Quantity ]

Set Variable [ $price; Value:Job_Order_Line_Items::UnitPrice]

#--------------------------------------Go to invoice line items window

February 21, 2012 22:53:44 -1-Estimates 2012v1.1.fp7 - Create Invoices Copy

==Create Invoices==: Create Invoices Copy

// Select Window [ Name: "Transferring Line Items...Part 2"; Current file ]

Go to Layout[ “Invoice_LineItems_Maint” (Invoice_LineItems) ]

New Record/Request

Go to Record/Request/Page

[ Last ]

Set Field[ Invoice_LineItems::id_invoice ; $ID_INV ]

Set Field[ Invoice_LineItems::Description ; $desc ]

Set Field[ Invoice_LineItems::Quantity; $quantity ]

Set Field[ Invoice_LineItems::UnitPrice ; $price ]

Set Field[ Invoice_LineItems::joblineitem; $lineid ]

#--------------------------------------If lineitem from Jobs exists, notify user

If [ Invoice_LineItems::joblineitem ]

Show Custom Dialog[ Title: "Invoicing Error!"; Message: "An Invoice with some of the line items you selected have already bee

invoiced for. Please verify you selection and try creating another invoice!"; Buttons: “Yes”, “Cancel” ]

If [ Get ( LastMessageChoice ) = "2" ]

Revert Record/Request

[ No dialog ]

Go to Layout[ “Job Orders” (JobOrders) ]

Exit Script [ ]

End If

End If

// Select Window [ Name: "Transferring Line Items"; Current file ]

Go to Layout[ “Job Order Line Items - Maintenance” (Job_Order_Line_Items) ]

Go to Record/Request/Page

[ Next; Exit after last ]

End Loop

// Close Window [ Name: "Transferring Line Items...Part 2"; Current file ]

// Close Window [ Name: "Transferring Line Items"; Current file ]

End If

// Select Window [ Current Window ]

Go to Layout[ “Invoices_From_Jobs” (Invoices_From_Jobs) ]

Commit Records/Requests

Adjust Window

[ Maximize ]

Set Zoom Level

[ 150% ]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.