[!]----- This code will generate files that can be imported from M.Y.O.B. By default, generated files will be "import_myob_cust.txt" for customer data and "import_myob_sales.txt" for sales data . M.Y.O.B uses Chart of Account and requires that sales record have one of the account # in Chart of Account as a field. This template uses "41000", but you would want to replace that with the account # of your choice that already exists in Chart of Account. WebMerchant allows blank company name; M.Y.O.B does not. This template fills in company name field with customer name in case the company name is blank. -----[/!] [Text]blank=[/Text] [!]=====================================================================[/!] [!] Show form [/!] [!]=====================================================================[/!] [showif [action]!Generate]

Select order file:



Generated File(Customer):

Generated File(Sales):
[/showif] [showif [action]=Generate] Starting...
[!]---------------------------------------------------------------------[/!] [!] Generate import file for MYOB [/!] [!]---------------------------------------------------------------------[/!] [WriteFile [writeToCust]][!] [/!]Co./Last Name [!] [/!]First Name [!] [/!]Addr 1 - Line 1 [!] [/!] - Line 2 [!] [/!] - Line 3 [!] [/!] - Line 4 [!] [/!] - City [!] [/!] - State [!] [/!] - Postcode [!] [/!]Addr 2 - Line 1 [!] [/!] - Line 2 [!] [/!] - Line 3 [!] [/!] - Line 4 [!] [/!] - City [!] [/!] - State [!] [/!] - Postcode [!] [/!]Phone # 1 [!] [/!]Phone # 2 [!] [/!]Fax # [!] [/!]Identifiers [!] [/!]Salutation [!] [/!]Contact Name [!] [/!]Notes [/WriteFile] Cust header written...
[WriteFile [writeToSales]][!] [/!]Co./Last Name [!] [/!]First Name [!] [/!]Addr 1 - Line 1 [!] [/!] - Line 2 [!] [/!] - Line 3 [!] [/!] - Line 4 [!] [/!]Invoice # [!] [/!]Date [!] [/!]Customer PO [!] [/!]Ship Via [!] [/!]Handwritten [!] [/!]Description [!] [/!]Account # [!] [/!]Amount [!] [/!]Pending [/WriteFile] Sales header written...
[orderfile [readFrom]] [text]__company=[showif [company]=][name][/showif][showif [company]=][company][/showif][/text] [AppendFile [writeToCust]][!] [/!][showif [company]=][name][/showif][showif [company]=][company][/showif] [!] [/!][name] [!] [/!][address1] [!] [/!][address2] [!] [/!][blank] [!] [/!][blank] [!] [/!][city] [!] [/!][state] [!] [/!][zip] [!] [/!][ShipToAddress1] [!] [/!][ShipToAddress2] [!] [/!][blank] [!] [/!][blank] [!] [/!][ShipToCity] [!] [/!][ShipToState] [!] [/!][ShipToZip] [!] [/!][Phone] [!] [/!][ShipToPhone] [!] [/!][blank] [!] [/!][blank] [!] [/!][blank] [!] [/!][blank] [!] [/!][blank] [/AppendFile] Cust written...
[lineitems] [AppendFile [writeToSales]][!] [/!][__company] [!] [/!][name] [!] [/!][address1] [!] [/!][address2] [!] [/!][blank] [!] [/!][blank] [!] [/!][blank] [!] [/!][date] [!] [/!][blank] [!] [/!][blank] [!] [/!][blank] [!] [/!][blank] [!] [/!]41000 [!] [/!][math][quantity]*[price][/math] [!] [/!][blank] [/AppendFile] Sales written...
[/lineitems] [/orderfile]

Written to [writetoCust] (Customer) on [date] [time].

Written to [writetoSales] (Sales) on [date] [time].

[/showif]