Results 1 to 1 of 1
-
11-01-2012, 09:17 AM #1Junior Member
- Join Date
- Nov 2012
- Posts
- 1
3 layout invoice automated countery if script
Helllo,
I have to adjust current printing script. So that, based on country --> a different Invoice layout gets selected by the print invoice script.
This to meet EU vat regulations... Different informations has to be present for costumes/tax authorities = different layouts
my Idea:
Based on companies country input in the records I can have the script make an IF script...
Example:
1. if Companies::Country = "The Netherlands"
= Layout 1
2.if Companies::Country = "Belgium or France or Germany... Or (inside EU) "
= Layout 2
3.if Companies::Country = "other country OR lists"
= Layout 3
4. If... Not recognized = Please adjust country name error message
Please see the current Print Script.. below.
Could someone help me to get the proper if script adjustment.
Thanks in advanceIf [ Get(WindowMode)=0 ]
Perform Script [ “Confirm Privileges”; Parameter: "Invoices 1" ]
Set Error Capture [ On ]
Perform Script [ “Decide User Abort” ]
Commit Records/Requests
If [ Invs::Void = 1 ]
Show Custom Dialog [ Title: "Print Error"; Message: "Invoice " & Invs::Invoice_ID & " has been Voided. Nothing to print.";
Buttons: “OK” ]
Else If [ ILs::kOne ≠ 1 ]
Sort Records [ Specified Sort Order: Invs::Invoice_ID; ascending ]
[ Restore; No dialog ]
Go to Layout [ “Invoice Print (Non Merch)” (Invs) ]
Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore; No dialog ]
Perform Script [ “Window Control Preview” ]
Print [ Current record; All Pages; Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore ]
Enter Browse Mode
Go to Layout [ original layout ]
Perform Script [ “Window Control Browse” ]
Else
If [ Get ( ScriptParameter ) = 2 ]
Show Custom Dialog [ Message: "Really Print all the found Invoices?"; Buttons: “OK”, “Cancel” ]
If [ Get( LastMessageChoice) = 1 ]
Sort Records [ Specified Sort Order: Invs::Invoice_ID; ascending ]
[ Restore; No dialog ]
Go to Record/Request/Page
[ First ]
Loop
If [ ILs::kOne ≠ 1 ]
Go to Layout [ “Invoice Print (Non Merch)” (Invs) ]
Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore; No dialog ]
Print [ Current record; All Pages; Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore; No dialog ]
Enter Browse Mode
Else
Go to Related Record [ From table: “ILs”; Using layout: “Invoice Print” (ILs) ]
[ Show only related records ]
If [ Invs::vPrintSKU ]
Go to Layout [ “Invoice Print (SKU)” (ILs) ]
End If
If [ Get ( ScriptParameter ) = "Consolidated" ]
Go to Layout [ “Invoice Print (Consol)” (ILs) ]
End If
Perform Script [ “Sort IL Attrib” ]
Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore; No dialog ]
Print [ Records being browsed; All Pages; Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore; No dialog ]
End If
Go to Layout [ “Invoices 1” (Invs) ]
Enter Browse Mode
If [ Stds::vPrint_BackOrder_Invoice = 1 and
Orders::Qty_Open > 0 ]
Go to Related Record [ From table: “Orders”; Using layout: “Orders 1 Old” (Orders) ]
[ Show only related records ]
Go to Related Record [ From table: “OIs”; Using layout: “OIs 1” (OIs) ]
[ Show only related records ]
Perform Script [ “Order Print Back Order”; Parameter: "silent" ]
End If
Go to Layout [ “Invoices 1” (Invs) ]
Enter Browse Mode
Go to Record/Request/Page
[ Next; Exit after last ]
End Loop
Perform Script [ “Window Control Browse” ]
End If
Else
Go to Related Record [ From table: “ILs”; Using layout: “Invoice Print” (ILs) ]
[ Show only related records ]
If [ Invs::vPrintSKU ]
Go to Layout [ “Invoice Print (SKU)” (ILs) ]
End If
If [ Get ( ScriptParameter ) = "Consolidated" ]
Go to Layout [ “Invoice Print (Consol)” (ILs) ]
End If
Perform Script [ “Sort IL Attrib” ]
Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore; No dialog ]
Perform Script [ “Window Control Preview” ]
Print [ Records being browsed; All Pages; Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore ]
Go to Layout [ original layout ]
Enter Browse Mode
If [ Stds::vPrint_BackOrder_Invoice = 1 and
Orders::Qty_Open > 0 ]
Go to Related Record [ From table: “Orders”; Using layout: “Orders 1 Old” (Orders) ]
[ Show only related records ]
Go to Related Record [ From table: “OIs”; Using layout: “OIs 1” (OIs) ]
[ Show only related records ]
Perform Script [ “Order Print Back Order” ]
Go to Layout [ “Invoices 1” (Invs) ]
End If
Perform Script [ “Window Control Browse” ]
End If
End If
End If
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Automated script to generate a PDF / PDF's
By QuinnThompson in forum FileMaker Pro Versions 5 & 6Replies: 1Last Post: 05-04-2012, 03:36 PM -
FMP9SA automated server import script
By AlanBarker in forum FileMaker Pro Server and NetworkingReplies: 3Last Post: 04-07-2010, 03:27 PM -
variable to help me script an automated emailing of student progress reports
By toddlich in forum Script TriggersReplies: 3Last Post: 09-19-2009, 05:36 PM -
Creating automated mail script
By Naruto in forum FileMaker Pro 9Replies: 1Last Post: 07-07-2008, 09:08 AM -
Automated Script
By riff in forum ScriptMaker and ScriptingReplies: 1Last Post: 05-18-2004, 12:36 PM





Reply With Quote




Bookmarks