public SalesOrder Add(SalesOrder addso) { DateTime dtmDateOrdered = (DateTime)addso.DateOrdered; //auto authorise? DateTime?dtmDateAuthorised = null; int? intAuthorisedBy = null; addso.SalesOrderId = SalesOrder.Insert( addso.ClientNo , addso.CompanyId , addso.ContactNo , dtmDateOrdered , addso.CurrencyNo , addso.SalesMan , addso.TermsNo , addso.ShipToAddressNo , addso.ShipViaNo , addso.Account , addso.Freight , addso.CustomerPO , addso.DivisionNo , addso.TaxNo , addso.ShippingCost , addso.Notes , addso.Notes , addso.Paid , null , false , addso.Salesman2 , addso.Salesman2Percent , addso.IncotermNo , intAuthorisedBy , dtmDateAuthorised , 0 , addso.AS9120 ); return(addso); }