[execute _onLoad$+="_SkipTabsOn('fm_browse');"] [ttl]Order/Quote Entry[/ttl]
[show infobox_msg$ class="infobox show_till_change"]

[form program=*fm_webmaint]

[hide %fm_usefile$ value="PendingOrders" secure]
[execute perform "orders;FM_Init",err=*proceed]

[section half]

Client Identification
[row "\[show usefile field=ClientId$\]:"][input ClientId$ usefile][/row]
[row "\[show usefile field=ClientName$\]:"][input ClientName$ usefile][/row]
[row "\[show usefile field=PONumber$\]:"][input PONumber$ usefile][/row]
[row "\[show usefile field=SalesRepCode$\]:"][list SalesRepCode$ usefile program=*class;ClassList,"Salesrep"][/list][/row]
[row "\[show usefile field=CreditNote\]:"][checkbox CreditNote usefile][/checkbox][/row]
[/section]

[section half] [div class=saveopt]

Save and Recall Order/Quote
[row "\[show usefile field=PendingID$\]:"][input PendingID$ usefile event=Change_Key focus] [include *fm_browse.html][/row]
[row "\[show usefile field=Recurring\]:"][checkbox Recurring usefile][/checkbox][/row]

[include _fm_savedel] [/div][addevent CreditNote event=orders@redraw][if CreditNote][css]body, #pageContents { background-color: #FEE; }[/css][/if]
[/section]

[folder Folder$ class="web"][tab]General[/tab]

[section half]

Billing Address
[row "\[show usefile field=BillAddress1$\]:"][input BillAddress1$ usefile][/row]
[row "\[show usefile field=BillAddress2$\]:"][input BillAddress2$ usefile][/row]
[row "\[show usefile field=BillCity$\]:"][input BillCity$ usefile][/row]
[row "\[show usefile field=BillRegion$\]:"][input BillRegion$ usefile][/row]
[row "\[show usefile field=BillCountry$\]:"][input BillCountry$ usefile][/row]
[row "\[show usefile field=BillZipCode$\]:"][input BillZipCode$ usefile][/row]
[row "\[show usefile field=BillEmail$\]:"][input BillEmail$ usefile][/row]
[/section]

[section half]

Shipping Address
[row "\[show usefile field=ShipAddress1$\]:"][input ShipAddress1$ usefile][/row]
[row "\[show usefile field=ShipAddress2$\]:"][input ShipAddress2$ usefile][/row]
[row "\[show usefile field=ShipCity$\]:"][input ShipCity$ usefile][/row]
[row "\[show usefile field=ShipRegion$\]:"][input ShipRegion$ usefile][/row]
[row "\[show usefile field=ShipCountry$\]:"][input ShipCountry$ usefile][/row]
[row "\[show usefile field=ShipZipCode$\]:"][input ShipZipCode$ usefile][/row]
[/section]

[section half]

Billing Information
[row "\[show usefile field=ClientTaxGrp$\]:"][list ClientTaxGrp$ usefile program=*class;ClassList,"TaxGrpClient"][/list][/row]
[row "\[show usefile field=Currency$\]:"][list Currency$ usefile program=*class;ClassList,"Currency"][/list][/row]
[row "\[show usefile field=Terms$\]:"][list Terms$ usefile program=*class;ClassList,"Terms"][/list][/row]
[row "\[show usefile field=PriceList$\]:"][list PriceList$ usefile program=*class;ClassList,"PriceList"][/list][/row]
[row "\[show usefile field=Discount\]:"][input Discount usefile][/row]
[/section]

[section half]

Shipping Information
[row "\[show usefile field=SiteId$\]:"][list SiteId$ usefile program=*class;ClassList,"SiteId"][/list][/row]
[row "\[show usefile field=ShipVia$\]:"][list ShipVia$ usefile program=*class;ClassList,"ShipVia"][/list][/row]
[row "\[show usefile field=ShipByDate$\]:"][input ShipByDate$ usefile][/row]
[/section]

[tab]Lines[/tab]

[section half] [/section][section flex][include ordgrid.html][/section][section quarter]

Order Weight
[row "\[show usefile field=TotalWeight\]:"][input TotalWeight usefile][/row]
[row "\[show usefile field=WeightUOM$\]:"][list WeightUOM$ usefile program=*class;ClassList,"UomWeight"][/list][/row]
Order Summary
[row "\[show usefile field=TotalAmt\]:"][input TotalAmt usefile][/row]
[row "\[show usefile field=TotalDiscount\]:"][input TotalDiscount usefile][/row]
[row "\[show usefile field=Freight\]:"][input Freight usefile][/row]
[row "\[show usefile field=TotalTax\]:"][input TotalTax usefile][/row]


[row "\[show usefile field=GrandTotal\]:"][input GrandTotal usefile][/row]
[hide frtBase] [hide frtTaxRate] [hide frtPerItem] [hide frtWeightUnits] [hide frtUnitCost] [hide CurrentId$] [hide InvoiceNo$] [addcalc totalweight calc="dtl_grid:ItemTotWeight"] [addcalc Freight calc="(totalWeight==0?0:frtBase)+frtPerItem*dtl_grid:itemsShipped+frtUnitCost*int(.999+totalWeight/max(0.0001,frtWeightUnits))"] [addcalc totalAmt calc="dtl_grid:priceext"][addcalc totalDiscount calc="0-(totalAmt*Discount)/100"] [addcalc TotalTax calc="(dtl_grid:ItemTaxamt*(100-Discount))/100+(Freight*FrtTaxRate/100)"] [addcalc GrandTotal calc="totalAmt+totalDiscount+totalTax+Freight"] [addevent clientid$ event=chgClient] [addevent ClientTaxGrp$ event=updGrid] [addevent pricelist$ event=updPriceList] [addevent currency$ event=updGrid] [addevent WeightUOM$ event=updGrid] [addevent shipvia$ event=updFreight] [addevent Shipregion$ event=updFreight] [addevent ShipCountry$ event=updFreight] [addevent SiteId$ event=updAll]
[/section]

[section half] [/section]

[/folder]

[section whole][/section]

[section whole class="fm_btmbtn"][include *fm_action.html][/section]

[hide _fm_changes value=0]
[hide _fm_event$ value=""]
[hide _fm_record_key$ value=""]
[hide _fm_change_key$ value=""]
[hide _fm_file$ value="pending_ords" secure]
[hide _fm_key$ value=PendingID$]
[hide _fm_key_iol$ value="IOLIST k.PendingID$"]
[hide _fm_inquiry$ value="0"]
[hide _fm_new_prop$ value="0"]
[hide _fm_clear_prop$ value="0"]
[hide _fm_confirm_new_prop$ value="0"]
[hide _fm_ack_write_prop$ value="0"]
[hide _fm_confirm_del_prop$ value="1"]
[hide _fm_ack_delete_prop$ value="1"]
[hide _fm_defaults$ value="BillRegion$==%sys.RegionDflt$|BillCountry$==%sys.CountryDflt$|ShipRegion$==%sys.RegionDflt$|ShipCountry$==%sys.CountryDflt$|ClientTaxGrp$==%sys.ClientTaxGrpDflt$|Currency$==%sys.CurrencyDflt$|Terms$==%sys.TermsDflt$|PriceList$==%sys.PriceListDflt$|SiteId$==%sys.SiteDflt$|ShipVia$==%sys.ShippingDflt$|WeightUOM$==%sys.WeightUOMDflt$|"]
[hide _fm_interface$ value="orders"]
[hide _fm_orig$ value$="" secure]
[hide _fm_current$ value$="" secure]
[hide _fm_chg_var$ value$=""]
[hide _fm_panel_iol$ value="ClientId$,ClientName$,PONumber$,SalesRepCode$,CreditNote,PendingID$,Recurring,BillAddress1$,BillAddress2$,BillCity$,BillRegion$,BillCountry$,BillZipCode$,BillEmail$,ShipAddress1$,ShipAddress2$,ShipCity$,ShipRegion$,ShipCountry$,ShipZipCode$,ClientTaxGrp$,Currency$,Terms$,PriceList$,Discount,SiteId$,ShipVia$,ShipByDate$,WeightUOM$," secure]
[hide _fm_ro_iol$ value="TotalWeight,TotalAmt,TotalDiscount,Freight,TotalTax,GrandTotal," secure]
[hide _fm_desc_list$ value="Client ID|Name|Purchase Order|Sales Rep Code|Credit Note|Order/Quote Worksheet ID|Recurring Order/Quote|Address Line 1|Address Line 2|City|State/Province|Country Name|Zip/Postal Code|Email Address|Address Line 1|Address Line 2|City|State/Province|Country Name|Zip/Postal Code|Client Tax Group|Currency|Payment Terms|Price List|Discount %|Ordered From|Shipment Method|Target Ship Date|UOM Weight|"]
[/form]