[execute _onLoad$+="_SkipTabsOn('fm_browse');"]
[ttl]Sales Quotes Entry/Edit[/ttl]
[show infobox_msg$ class="infobox show_till_change"]
[form program=*fm_webmaint]
[hide %fm_usefile$ value="Quotes" secure]
[execute perform "quotes;FM_Init",err=*proceed]
[section half]
[row "\[show usefile field=QuoteNo$\]:"][input QuoteNo$ usefile event=Change_Key focus] [include *fm_browse.html][/row]
[/section]
[section half]
[row "\[show usefile field=ClientId$\]:"][input ClientId$ usefile][/row]
[/section]
[section half]
[row "\[show usefile field=ClientName$\]:"][input ClientName$ usefile][/row]
[/section]
[folder Folder$ class="web"][tab]General[/tab]
[section half]
Quote Information
[row "\[show usefile field=OrderSts$\]:"][list OrderSts$ usefile program=*class;ClassList,"OrderSts"][/list][/row]
[row "\[show usefile field=OrderDate$\]:"][input OrderDate$ usefile][/row]
[row "\[show usefile field=PONumber$\]:"][input PONumber$ usefile][/row]
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]
Billing information
[row "\[show usefile field=SalesRepCode$\]:"][list SalesRepCode$ usefile program=*class;ClassList,"Salesrep"][/list][/row]
[row "\[show usefile field=TaxGroup$\]:"][input TaxGroup$ usefile][/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=ShipVia$\]:"][list ShipVia$ usefile program=*class;ClassList,"ShipVia"][/list][/row]
[row "\[show usefile field=ShipByDate$\]:"][input ShipByDate$ usefile][/row]
[row "\[show usefile field=SiteId$\]:"][list SiteId$ usefile program=*class;ClassList,"SiteId"][/list][/row]
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]
[show SHOW.TAXGROUP$ variable]
[/section]
[tab]Lines[/tab]
[section half]
[/section][section flex][include ordgrid.html][/section][section third]
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]
[/section]
[section half]
[/section]
[section whole]
[/section]
[section half]
[row "\[show usefile field=GrandTotal\]:"][input GrandTotal usefile][/row]
[hide frtBase]
[hide frtPerItem]
[hide frtWeightUnits value=1]
[hide frtUnitCost]
[addcalc totalweight calc="dtl_grid:ItemTotWeight"]
[addcalc Freight calc="frtBase+frtPerItem*dtl_grid:itemqty+frtUnitCost*max(1,int(.999+totalWeight/frtWeightUnits))"]
[addcalc totalAmt calc="dtl_grid:priceext"][addcalc totalDiscount calc="0-(totalAmt*Discount)/100"]
[addcalc TotalTax calc="dtl_grid:ItemTaxamt"]
[addcalc GrandTotal calc="totalAmt+totalDiscount+totalTax+Freight"]
[/section]
[section half]
[/section]
[tab]Status[/tab]
[section half]
Approval Status
[row "\[show usefile field=Approval$\]:"][input Approval$ usefile][/row]
[row "\[show usefile field=ApprovedOn$\]:"][input ApprovedOn$ usefile][/row]
[addevent clientid$ event=quotes@LoadClient][addevent taxgroup$ event=quotes@updGrid][addevent pricelist$ event=quotes@updGrid][addevent currency$ event=quotes@updGrid][addevent shipvia$ event=quotes@chgShipVia][addevent WeightUOM$ event=quotes@updGrid]
[addevent SiteId$ event=quotes@updgrid]
[/section]
[section half]
Invoiced Information
[row "\[show usefile field=InvoiceNo$\]:"][input InvoiceNo$ usefile][/row]
[row "\[show usefile field=InvoiceDate$\]:"][input InvoiceDate$ usefile][/row]
[/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="quotes_hdr" secure]
[hide _fm_key$ value=QuoteNo$]
[hide _fm_key_iol$ value="IOLIST k.QuoteNo$"]
[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_show_vars$ value=SHOW.TAXGROUP$;TaxGroup:]
[hide _fm_defaults$ value="OrderSts$=A|OrderDate$==DTE(0:"YYYYMMDD")|BillRegion$==%sys.RegionDflt$|BillCountry$==%sys.CountryDflt$|TaxGroup$==%sys.TaxGroupDflt$|Currency$==%sys.CurrencyDflt$|Terms$==%sys.TermsDflt$|PriceList$==%sys.PriceListDflt$|ShipVia$==%sys.ShippingDflt$|ShipRegion$==%sys.RegionDflt$|ShipCountry$==%sys.CountryDflt$|WeightUOM$==%sys.WeightUOMDflt$|"]
[hide _fm_interface$ value="quotes"]
[hide _fm_orig$ value$="" secure]
[hide _fm_current$ value$="" secure]
[hide _fm_chg_var$ value$=""]
[hide _fm_panel_iol$ value="QuoteNo$,ClientId$,ClientName$,OrderSts$,OrderDate$,PONumber$,BillAddress1$,BillAddress2$,BillCity$,BillRegion$,BillCountry$,BillZipCode$,SalesRepCode$,TaxGroup$,Currency$,Terms$,PriceList$,Discount,ShipVia$,ShipByDate$,SiteId$,ShipAddress1$,ShipAddress2$,ShipCity$,ShipRegion$,ShipCountry$,ShipZipCode$,WeightUOM$," secure]
[hide _fm_ro_iol$ value="TotalWeight,TotalAmt,TotalDiscount,Freight,TotalTax,GrandTotal,Approval$,ApprovedOn$,InvoiceNo$,InvoiceDate$," secure]
[hide _fm_desc_list$ value="Quote #|Client ID|Name|Quote Status|Quote Date|Purchase Order|Address Line 1|Address Line 2|City|State/Province|Country Name|Zip Code/Postal Code|Sales Rep Code|Tax Group|Currency|Payment Terms|Price List|% Discount|Shipment Method|Ship Date|Ship From|Address Line 1|Address Line 2|City|State/Province|Country Name|Zip Code/Postal Code|UOM Weight|"]
[/form]