<!--
DTD for small business XML objects.
Authors: Brian Chess, Craig Sullivan, and Heidi Hammack.
-->

<!--
NetLedger IPR Software Notice
Copyright (c) 2000 NetLedger, Inc. All Rights Reserved.
http://www.smbxml.org/legal/IPRSoftware(2000-05-11)
-->

<!--
Revision History:
	5/15/2000:	1.00 Release
-->

<!--			Enumerated Types		-->

<!ENTITY	% EntityType	"Customer|Employee|OtherName|Vendor" >

<!ENTITY	% ListType		"%EntityType;|Account|Class|CustomerJob|
					CustomerMsg|CustomerType|DiscountItem|
					ExpenseCategory|InventoryItem|
					NonInventoryItem|OtherChargeItem|
					PaymentItem|PayMethod|ResaleNonInventoryItem|
					ResaleOtherChargeItem|ResaleServiceItem|
					SalesTaxItem|ServiceItem|ShipMethod|Terms|
					VendorType" >


<!ENTITY	% BusinessTransactionType	"Bill|CashSale| CreditMemo|CustomerEstimate|
						CustomerInvoice|CustomerPayment|
						CustomerRefund|ExpenseReport|JournalEntry|
						PurchaseOrder|TimeTracking|VendorCredit" >


<!ENTITY	% ReconcilableTransactionType		"Check|CreditCardPurchase|Deposit|Transfer" >


<!ENTITY	% TransactionType	"%BusinessTransactionType;|%ReconcilableTransactionType;" >


<!ENTITY	% ObjectType		"%TransactionType;|%ListType;" >


<!ENTITY	% AccountType	"AccountsPayable|AccountsReceivable|Bank|COGS|ChargeCreditCard|
					Equity|Expense|FixedAsset|Income|LongTermLiability|
					NonPosting|OtherAsset|OtherCurrentAsset|
					OtherCurrentLiability|OtherExpense|OtherIncome" >


<!--			Simple DataTypes		-->

<!ENTITY	% Boolean			"(true|false)" >
<!ENTITY	% Integer			"CDATA" >
<!ENTITY	% Unsigned			"CDATA" >
<!ENTITY	% String			"CDATA" >
<!ENTITY	% Float10_5			"%String;" >
<!ENTITY	% Money12_2			"%String;" >
<!ENTITY	% String3			"%String;" >
<!ENTITY	% String5			"%String;" >
<!ENTITY	% String7			"%String;" >
<!ENTITY	% String8			"%String;" >
<!ENTITY	% String10			"%String;" >
<!ENTITY	% String14			"%String;" >
<!ENTITY	% String15			"%String;" >
<!ENTITY	% String16			"%String;" >
<!ENTITY	% String18			"%String;" >
<!ENTITY	% String21			"%String;" >
<!ENTITY	% String25			"%String;" >
<!ENTITY	% String29			"%String;" >
<!ENTITY	% String31			"%String;" >
<!ENTITY	% String41			"%String;" >
<!ENTITY	% String64			"%String;" >
<!ENTITY	% String99			"%String;" >
<!ENTITY	% MultiLineString999		"%String;" >


<!--		Definition and Reference Types		-->

<!ENTITY	% DateType			"%String;" > <!-- mm/dd/yyyy -->
<!ENTITY	% EntityDef			"%String;" > 
<!ENTITY	% EntityRef			"%String;" >
<!ENTITY	% NameDef			"%String;" >
<!ENTITY	% NameRef			"%String;" >
<!ENTITY	% NameDef99			"%NameDef;" >
<!ENTITY	% NameRef99			"%NameRef;" >
<!ENTITY	% TransDef			"%NameDef;" >
<!ENTITY	% TransRef			"%NameRef;" >
<!ENTITY	% AccountDef31			"%NameDef;" >
<!ENTITY	% AccountRef31			"%NameRef;" >
<!ENTITY	% BillDef10			"%TransDef;" >
<!ENTITY	% BillRef10			"%TransRef;" >
<!ENTITY	% CashSaleDef29			"%TransDef;" >
<!ENTITY	% CashSaleRef29			"%TransRef;" >
<!ENTITY	% ChargeCCDef10			"%TransDef;" >
<!ENTITY	% ChargeCCRef10			"%TransRef;" >
<!ENTITY	% CheckDef10			"%TransDef;" >
<!ENTITY	% CheckRef10			"%TransRef;" >
<!ENTITY	% ClassDef31			"%NameDef;" >
<!ENTITY	% ClassRef31			"%NameRef;" >
<!ENTITY	% CreditInvDef29		"%TransDef;" >
<!ENTITY	% CreditInvRef29		"%TransRef;" >
<!ENTITY	% CustomerDef41			"%EntityDef;" >
<!ENTITY	% CustomerRef41			"%EntityRef;" >
<!ENTITY	% CustomerJobDef41		"%NameDef;" >
<!ENTITY	% CustomerJobRef41		"%NameRef;" >
<!ENTITY	% CustomerMsgDef101		"%NameDef;" >
<!ENTITY	% CustomerMsgRef101		"%NameRef;" >
<!ENTITY	% CustomerTypeDef31		"%NameDef;" >
<!ENTITY	% CustomerTypeRef31		"%NameRef;" >
<!ENTITY	% CustEstDef29			"%TransDef;" >
<!ENTITY	% CustEstRef29			"%TransRef;" >
<!ENTITY	% CustInvDef29			"%TransDef;" >
<!ENTITY	% CustInvRef29			"%TransRef;" >
<!ENTITY	% CustRefundDef29		"%TransDef;" >
<!ENTITY	% CustRefundRef29		"%TransRef;" >
<!ENTITY	% DepositDef10			"%TransDef;" >
<!ENTITY	% DepositRef10			"%TransRef;" >
<!ENTITY	% EmployeeDef41			"%EntityDef;" >
<!ENTITY	% EmployeeRef41			"%EntityRef;" >
<!ENTITY	% ExpenseDef31			"%NameDef;" >
<!ENTITY	% ExpenseRef31			"%NameRef;" >
<!ENTITY	% ExpReportDef29		"%TransDef;" >
<!ENTITY	% ExpReportRef29		"%TransRef;" > 
<!ENTITY	% ItemDef13			"%NameDef;" >
<!ENTITY	% ItemRef13			"%NameRef;" >
<!ENTITY	% JEDef10			"%TransDef;" >
<!ENTITY	% JERef10			"%TransRef;" >
<!ENTITY	% JETranDef			"%Integer;" >
<!ENTITY	% JETranRef			"%Integer;" >
<!ENTITY	% OtherNameDef41		"%EntityDef;" >
<!ENTITY	% OtherNameRef41		"%EntityRef;" >
<!ENTITY	% PayDef10			"%TransDef;" >
<!ENTITY	% PayRef10			"%TransRef;" >
<!ENTITY	% PayMethodDef13		"%NameDef;" >
<!ENTITY	% PayMethodRef13		"%NameRef;" >
<!ENTITY	% PODef29			"%TransRef;" >
<!ENTITY	% PORef29			"%TransRef;" >
<!ENTITY	% SalesTaxItemDef13		"%NameDef;" >
<!ENTITY	% SalesTaxItemRef13		"%NameRef;" >
<!ENTITY	% ServiceItemDef13		"%NameDef;" >
<!ENTITY	% ServiceItemRef13		"%NameRef;" >
<!ENTITY	% ShipMethodDef15		"%NameDef;" >
<!ENTITY	% ShipMethodRef15		"%NameRef;" >
<!ENTITY	% TermsDef31			"%NameDef;" >
<!ENTITY	% TermsRef31			"%NameRef;" >
<!ENTITY	% TimeTrackingDef99		"%NameDef;" >
<!ENTITY	% TimeTrackingRef99		"%NameRef;" >
<!ENTITY	% TranExpDef			"%NameDef;" >
<!ENTITY	% TranExpRef			"%NameRef;" >
<!ENTITY	% TransferDef29			"%TransDef;" >
<!ENTITY	% TransferRef29			"%TransRef;" >
<!ENTITY	% VendorDef41			"%EntityDef;" >
<!ENTITY	% VendorRef41			"%EntityRef;" >
<!ENTITY	% VendorCreditDef10		"%TransDef;" >
<!ENTITY	% VendorCreditRef10		"%TransRef;" >
<!ENTITY	% VendorTypeDef31		"%NameDef;" >
<!ENTITY	% VendorTypeRef31		"%NameRef;" >


<!--			Object Definitions		-->


<!--			List Definitions		-->
	<!-- List names are hierarchical unless otherwise noted.  The hierarchy delimiter
		is a colon (':').  For example, "Games:Chess:Pawn". -->
		
<!ELEMENT	Customer		EMPTY >
<!ATTLIST	Customer
	name			%CustomerDef41;		#REQUIRED
	company			%String41;		#IMPLIED
	salutation 		%String15;		#IMPLIED
	first_name		%String25;		#IMPLIED
	middle_initial		%String5;		#IMPLIED
	last_name		%String25;		#IMPLIED
	contact			%String41;		#IMPLIED
	bill_address		%MultiLineString999;	#IMPLIED
	ship_address		%MultiLineString999;	#IMPLIED	
	phone			%String21;		#IMPLIED
	email			%String64;		#IMPLIED
	fax			%String21;		#IMPLIED
	alt_phone		%String21;		#IMPLIED
	alt_contact		%String41;		#IMPLIED
	account			%String99;		#IMPLIED
	type			%CustomerTypeRef31;	#IMPLIED
	terms			%TermsRef31;		#IMPLIED
	rep			%EmployeeRef41;		#IMPLIED
	credit_limit		%Money12_2;		#IMPLIED
	is_taxable		%Boolean;		"false"
	tax_item		%SalesTaxItemRef13;	#IMPLIED
	resale_num		%String15;		#IMPLIED
	open_balance		%Money12_2;		#IMPLIED
	open_bal_date		%DateType;		#IMPLIED
	is_inactive		%Boolean;		"false"
	password		%String16;		#IMPLIED >

<!ELEMENT	Employee		EMPTY >
<!ATTLIST	Employee
	name			%EmployeeDef41;		#REQUIRED
	initials		%String3;		#IMPLIED
	tax_id			%String15;		#IMPLIED
	salutation 		%String15;		#IMPLIED
	first_name		%String25;		#IMPLIED
	middle_initial		%String5;		#IMPLIED
	last_name		%String25;		#IMPLIED
	address			%MultiLineString999;	#IMPLIED
	phone			%String21;		#IMPLIED
	email			%String64;		#IMPLIED
	account			%String99;		#IMPLIED
	class			%ClassRef31;		#IMPLIED
	is_inactive		%Boolean;		"false"
	password		%String16;		#IMPLIED >
	
<!ELEMENT	OtherName		EMPTY >
<!ATTLIST	OtherName
	name			%OtherNameDef41;	#REQUIRED
	company			%String41;		#IMPLIED
	salutation 		%String15;		#IMPLIED
	first_name		%String25;		#IMPLIED
	middle_initial		%String5;		#IMPLIED
	last_name		%String25;		#IMPLIED
	address			%MultiLineString999;	#IMPLIED
	contact			%String41;		#IMPLIED
	phone			%String21;		#IMPLIED
	fax			%String21;		#IMPLIED
	alt_contact		%String41;		#IMPLIED
	alt_phone		%String21;		#IMPLIED
	account			%String99;		#IMPLIED
	is_inactive 		%Boolean;		"false" >
	
<!ELEMENT	Vendor		EMPTY >
<!ATTLIST	Vendor
	name			%VendorDef41;		#REQUIRED
	company			%String41;		#IMPLIED
	salutation		%String15;		#IMPLIED
	first_name		%String25;		#IMPLIED
	middle_initial		%String5;		#IMPLIED
	last_name		%String25;		#IMPLIED
	contact			%String41;		#IMPLIED
	address			%MultiLineString999;	#IMPLIED
	phone			%String21;		#IMPLIED
	fax			%String21;		#IMPLIED
	alt_phone		%String21;		#IMPLIED
	alt_contact		%String41;		#IMPLIED
	print_on_check_as	%String41;		#IMPLIED
	account_num		%String99;		#IMPLIED
	default_exp_acct	%AccountRef31;		#IMPLIED
	type			%VendorTypeRef31;	#IMPLIED
	terms			%TermsRef31;		#IMPLIED
	credit_limit		%Money12_2;		#IMPLIED
	tax_id			%String15;		#IMPLIED
	is_1099_eligible	%Boolean;		"false"
	email			%String64;		#IMPLIED
	open_balance		%Money12_2;		#IMPLIED
	open_bal_date		%DateType;		#IMPLIED
	is_inactive		%Boolean;		"false" >
	
<!ELEMENT	Account		EMPTY >
<!ATTLIST	Account
	name			%AccountDef31;		#REQUIRED
	type			(%AccountType;)		#REQUIRED
	number			%String7;		#IMPLIED
	description		%String29;		#IMPLIED
	open_balance		%Money12_2;		#IMPLIED
	open_bal_date		%DateType;		#IMPLIED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	Class			EMPTY >
<!ATTLIST	Class
	name			%ClassDef31;		#REQUIRED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	CustomerJob		EMPTY >
<!ATTLIST	CustomerJob
	name			%CustomerJobDef41;	#REQUIRED
	customer		%CustomerRef41;		#REQUIRED
	company			%String41;		#IMPLIED
	salutation		%String15;		#IMPLIED
	first_name		%String25;		#IMPLIED
	middle_initial		%String5;		#IMPLIED
	last_name		%String25;		#IMPLIED
	contact			%String41;		#IMPLIED
	bill_address		%MultiLineString999;	#IMPLIED
	ship_address		%MultiLineString999;	#IMPLIED	
	phone			%String21;		#IMPLIED
	email			%String64;		#IMPLIED
	fax			%String21;		#IMPLIED
	alt_phone		%String21;		#IMPLIED
	alt_contact		%String41;		#IMPLIED
	account			%String99;		#IMPLIED
	type			%CustomerTypeRef31;	#IMPLIED
	terms			%TermsRef31;		#IMPLIED
	rep			%EmployeeRef41;		#IMPLIED
	credit_limit		%Money12_2;		#IMPLIED
	is_taxable		%Boolean;		"false"
	tax_item		%SalesTaxItemRef13;	#IMPLIED
	resale_num		%String15;		#IMPLIED
	open_balance		%Money12_2;		#IMPLIED
	open_bal_date		%DateType;		#IMPLIED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	CustomerMsg	EMPTY >
<!ATTLIST	CustomerMsg
	name			%CustomerMsgDef101;	#REQUIRED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	CustomerType	EMPTY >
<!ATTLIST	CustomerType
	name			%CustomerTypeDef31;	#REQUIRED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	DiscountItem		EMPTY >
<!ATTLIST	DiscountItem
	name			%ItemDef13;		#REQUIRED
	description		%MultiLineString999;	#IMPLIED
	account			%AccountRef31;		#REQUIRED
	rate			%Float10_5;		#IMPLIED
	apply_before_tax	%Boolean;		"false"
	is_inactive		%Boolean;		"false" >

<!ELEMENT	ExpenseCategory		EMPTY >
<!ATTLIST	ExpenseCategory
	name			%ExpenseDef31;		#REQUIRED
	description		%MultiLineString999;	#IMPLIED
	exp_account		%AccountRef31;		#REQUIRED 
	is_inactive		%Boolean;		"false" >

<!ELEMENT	InventoryItem		EMPTY >
<!ATTLIST	InventoryItem
	name			%ItemDef13;		#REQUIRED
	purch_descrip		%MultiLineString999;	#IMPLIED
	cost			%Money12_2;		#IMPLIED
	cogs_account		%AccountRef31;		#REQUIRED
	preferred_vendor	%VendorRef41;		#IMPLIED
	sales_descrip		%MultiLineString999;	#IMPLIED
	income_account		%AccountRef31;		#REQUIRED
	sales_price		%Money12_2;		#IMPLIED
	is_taxable		%Boolean;		"false"
	asset_account		%AccountRef31;		#REQUIRED
	quantity_on_hand	%Float10_5;		#IMPLIED
	total_value		%Money12_2;		#IMPLIED
	reorder_point		%Float10_5;		#IMPLIED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	NonInventoryItem		EMPTY >
<!ATTLIST	NonInventoryItem
	name			%ItemDef13;		#REQUIRED
	description		%MultiLineString999;	#IMPLIED
	sales_price		%Money12_2;		#IMPLIED
	account			%AccountRef31;		#REQUIRED	
	is_taxable		%Boolean;		"false"
	is_inactive		%Boolean;		"false" >

<!ELEMENT	OtherChargeItem		EMPTY >
<!ATTLIST	OtherChargeItem
	name			%ItemDef13;	#REQUIRED
	description		%MultiLineString999;	#IMPLIED
	rate			%Money12_2;		#IMPLIED
	account			%AccountRef31;		#REQUIRED	
	is_taxable		%Boolean;		"false"
	is_inactive		%Boolean;		"false" >

<!ELEMENT	PaymentItem		EMPTY >
<!ATTLIST	PaymentItem
	name			%ItemDef13;	#REQUIRED
	description		%MultiLineString999;	#IMPLIED
	pay_method		%PayMethodRef13;	#IMPLIED
	account			%AccountRef31;		#IMPLIED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	PayMethod		EMPTY >
<!ATTLIST	PayMethod
	name			%PayMethodDef13;	#REQUIRED
	credit_card		%Boolean;		"false"
	is_inactive		%Boolean;		"false" >

<!ELEMENT	ResaleNonInventoryItem	EMPTY >
<!ATTLIST	ResaleNonInventoryItem
	name			%ItemDef13;	#REQUIRED
	purch_descrip		%MultiLineString999;	#IMPLIED
	cost			%Money12_2;		#IMPLIED
	exp_account		%AccountRef31;		#REQUIRED
	preferred_vendor	%VendorRef41;		#IMPLIED
	sales_descrip		%MultiLineString999;	#IMPLIED
	sales_price		%Money12_2;		#IMPLIED
	income_account		%AccountRef31;		#REQUIRED	
	is_taxable		%Boolean;		"false"
	is_inactive		%Boolean;		"false" >

<!ELEMENT	ResaleOtherCharge	EMPTY >
<!ATTLIST	ResaleOtherCharge
	name			%ItemDef13;		#REQUIRED
	purch_descrip		%MultiLineString999;	#IMPLIED
	cost			%Money12_2;		#IMPLIED
	exp_account		%AccountRef31;		#REQUIRED
	preferred_vendor	%VendorRef41;		#IMPLIED
	sales_descrip		%MultiLineString999;	#IMPLIED
	rate			%Money12_2;		#IMPLIED
	income_account		%AccountRef31;		#REQUIRED	
	is_taxable		%Boolean;		"false"
	is_inactive		%Boolean;		"false" >

<!ELEMENT	ResaleServiceItem	EMPTY >
<!ATTLIST	ResaleServiceItem
	name			%ItemDef13;		#REQUIRED
	purch_descrip		%MultiLineString999;	#IMPLIED
	cost			%Money12_2;		#IMPLIED
	exp_account		%AccountRef31;		#REQUIRED
	preferred_vendor	%VendorRef41;		#IMPLIED
	sales_descrip		%MultiLineString999;	#IMPLIED
	rate			%Money12_2;		#IMPLIED
	income_account		%AccountRef31;		#REQUIRED	
	is_taxable		%Boolean;		"false"
	is_inactive		%Boolean;		"false" >

<!ELEMENT	SalesTaxItem		EMPTY >
<!ATTLIST	SalesTaxItem
	name			%SalesTaxItemDef13;	#REQUIRED
	description		%MultiLineString999;	#IMPLIED
	rate			%Float10_5;		#IMPLIED
	tax_agency		%VendorRef41;		#REQUIRED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	ServiceItem		EMPTY >
<!ATTLIST	ServiceItem
	name			%ServiceItemDef13;	#REQUIRED
	description 		%MultiLineString999;	#IMPLIED
	rate			%Money12_2;		#IMPLIED
	account			%AccountRef31;		#REQUIRED	
	is_taxable		%Boolean;		"false"
	is_inactive		%Boolean;		"false" >

<!ELEMENT	ShipMethod			EMPTY >
<!ATTLIST	ShipMethod
	name			%ShipMethodDef15;	#REQUIRED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	Terms			EMPTY >
<!ATTLIST	Terms
	name			%TermsDef31;		#REQUIRED
	day_net_due		%Float10_5;		#IMPLIED
	discount_percent	%Float10_5;		#IMPLIED
	days_disc_exp		%Float10_5;		#IMPLIED
	day_month_due		%Float10_5;		#IMPLIED
	due_next_mo_days	%Float10_5;		#IMPLIED
	day_disc_exp		%Float10_5;		#IMPLIED
	is_inactive		%Boolean;		"false" >

<!ELEMENT	VendorType		EMPTY >
<!ATTLIST	VendorType
	name			%VendorTypeDef31;	#REQUIRED
	is_inactive		%Boolean;		"false" >


<!--	Transcation Definitions		-->

<!--	Business Transactions		-->

<!ELEMENT	Bill		((TranExpense|TranItem)+) >
<!ATTLIST	Bill
	tran_id			%BillDef10;		#IMPLIED 
	vendor			%VendorRef41;		#REQUIRED 
	terms			%TermsRef31;		#IMPLIED	
	amount			%Money12_2;		#REQUIRED
	date			%DateType;		#REQUIRED
	due_date		%DateType;		#IMPLIED	
	memo			%String99;		#IMPLIED
	is_paid			%Boolean;		"false"
	is_received		%Boolean;		"true" >

<!ELEMENT	TranExpense		EMPTY >
<!ATTLIST	TranExpense
	line_num		%Integer;		#REQUIRED
	account			%AccountRef31;		#REQUIRED
	amount			%Money12_2;		#REQUIRED
	memo			%String99;		#IMPLIED
	class			%ClassRef31;		#IMPLIED
	customer		%CustomerRef41;		#IMPLIED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_billable		%Boolean;		"false"	
	is_billed		%Boolean;		"false" >

<!ELEMENT	TranItem		EMPTY >
<!ATTLIST	TranItem
	line_num		%Integer;		#REQUIRED
	item			%ItemRef13;		#REQUIRED
	quantity		%Float10_5;		#IMPLIED
	description		%String99;		#IMPLIED
	rate			%Float10_5;		#IMPLIED
	amount			%Money12_2;		#REQUIRED
	class			%ClassRef31;		#IMPLIED
	customer		%CustomerRef41;		#IMPLIED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_billable		%Boolean;		"false" 	
	is_billed		%Boolean;		"false"  >
	
<!ELEMENT	TranExpReference	EMPTY >
<!ATTLIST	TranExpReference
	tran_id			%BillDef10;		#REQUIRED
	line_num		%Integer;		#REQUIRED
	markup_percent		%Float10_5;		#IMPLIED
	markup_account		%AccountRef31;		#IMPLIED >
	
<!ELEMENT	TranItemReference	EMPTY >
<!ATTLIST	TranItemReference
	tran_id			%BillDef10;		#REQUIRED 
	line_num		%Integer;		#REQUIRED >
	
	
<!ELEMENT	BillReference 		EMPTY >
<!ATTLIST	BillReference 
	tran_id			%BillRef10;		#REQUIRED
	payment			%Money12_2;		#REQUIRED >	

<!ELEMENT	CashSale		((CustomerInvoiceItem)+) >
<!ATTLIST	CashSale
	tran_id			%CashSaleDef29;		#IMPLIED
	customer		%CustomerRef41;		#REQUIRED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_taxable		%Boolean;		"false"
	class			%ClassRef31;		#IMPLIED
	to_be_printed		%Boolean;		"false"
	to_be_emailed		%Boolean;		"false"
	email			%String64;		#IMPLIED
	memo			%String99;		#IMPLIED
	chg_credit_card		%Boolean;		"false"
	cc_approved		%Boolean;		"false"
	is_deposited		%Boolean;		"false"
	deposit_to		%AccountRef31;		#IMPLIED
	bill_to			%MultiLineString999;	#IMPLIED
	date			%DateType;		#REQUIRED
	pay_method		%PayMethodRef13;	#IMPLIED
	check_num		%String29;		#IMPLIED
	credit_card_num		%String18;		#IMPLIED
	credit_card_exp		%DateType;		#IMPLIED
	customer_msg		%CustomerMsgRef101;	#IMPLIED
	name_on_card		%String18;		#IMPLIED
	card_zipcode		%String10;		#IMPLIED
	tax_agency		%SalesTaxItemRef13;	#IMPLIED
	tax_percent		%Float10_5;		#IMPLIED
	tax_total		%Money12_2;		#IMPLIED
	amount			%Money12_2;		#REQUIRED >
<!-- NOTE: if is_deposited is true then account is a REQUIRED field. 
	tran_id is Sale # field in the user interface -->


<!ELEMENT	CashSaleReference 		EMPTY >
<!ATTLIST	CashSaleReference 
	tran_id			%CashSaleRef29;		#REQUIRED
	payment			%Money12_2;		#REQUIRED >

<!ELEMENT	CreditMemo		((CustomerInvoiceItem|CustomerInvoiceReference)+) >
<!ATTLIST	CreditMemo
	tran_id			%CreditInvDef29;	#IMPLIED
	customer		%CustomerRef41;		#REQUIRED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_taxable		%Boolean;		"false"
	class			%ClassRef31;		#IMPLIED
	to_be_printed		%Boolean;		"false"
	to_be_emailed		%Boolean;		"false"
	email			%String64;		#IMPLIED
	memo			%String99;		#IMPLIED
	bill_to			%MultiLineString999;	#IMPLIED
	date			%DateType;		#REQUIRED
	po_num			%String29;		#IMPLIED
	customer_msg		%CustomerMsgRef101;	#IMPLIED
	tax_agency		%SalesTaxItemRef13;	#IMPLIED
	tax_percent		%Float10_5;		#IMPLIED
	tax_total		%Money12_2;		#IMPLIED
	amount			%Money12_2;		#REQUIRED >
<!-- tran_id is Credit # field in the user interface -->


<!ELEMENT	CreditMemoReference 		EMPTY >
<!ATTLIST	CreditMemoReference 
	tran_id			%CreditInvRef29;	#REQUIRED
	amount			%Money12_2;		#REQUIRED >	
	
<!ELEMENT	CustomerEstimate	((CustomerInvoiceItem)+) >
<!ATTLIST	CustomerEstimate
	tran_id			%CustEstDef29;		#IMPLIED
	customer		%CustomerRef41;		#REQUIRED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_taxable		%Boolean;		"false"
	class			%ClassRef31;		#IMPLIED
	to_be_printed		%Boolean;		"false"
	to_be_emailed		%Boolean;		"false"
	email			%String64;		#IMPLIED
	memo			%String99;		#IMPLIED
	bill_to			%MultiLineString999;	#IMPLIED
	date			%DateType;		#REQUIRED
	est_expires		%DateType;		#IMPLIED
	customer_msg		%CustomerMsgRef101;	#IMPLIED
	tax_agency		%SalesTaxItemRef13;	#IMPLIED
	tax_percent		%Float10_5;		#IMPLIED
	tax_total		%Money12_2;		#IMPLIED
	amount			%Money12_2;		#REQUIRED >
<!-- tran_id is Estimate # field in the user interface -->

<!ELEMENT	CustomerInvoice	((CustomerInvoiceItem|TranItemReference|TranExpReference|TimeTrackReference)+) >
<!ATTLIST	CustomerInvoice
	tran_id			%CustInvDef29;		#IMPLIED
	customer		%CustomerRef41;		#REQUIRED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_taxable		%Boolean;		"false"
	class			%ClassRef31;		#IMPLIED
	to_be_printed		%Boolean;		"false"
	to_be_emailed		%Boolean;		"false"
	email			%String64;		#IMPLIED
	memo			%String99;		#IMPLIED
	bill_to			%MultiLineString999;	#IMPLIED
	ship_to			%MultiLineString999;	#IMPLIED
	date			%DateType;		#REQUIRED
	terms			%TermsRef31;		#IMPLIED
	due_date		%DateType;		#IMPLIED
	ship_via		%ShipMethodRef15;	#IMPLIED
	ship_date		%DateType;		#IMPLIED
	fob			%String10;		#IMPLIED
	po_num			%String29;		#IMPLIED
	customer_msg		%CustomerMsgRef101;	#IMPLIED
	tax_agency		%SalesTaxItemRef13;	#IMPLIED
	tax_percent		%Float10_5;		#IMPLIED
	tax_total		%Money12_2;		#IMPLIED
	amount			%Money12_2;		#REQUIRED >
<!-- tran_id is Invoice # field in the user interface -->


<!ELEMENT	CustomerInvoiceItem		EMPTY >
<!ATTLIST	CustomerInvoiceItem
	item			%ItemRef13;		#REQUIRED
	quantity		%Float10_5;		#IMPLIED
	description		%String99;		#IMPLIED
	unit_price		%Float10_5;		#IMPLIED
	amount			%Money12_2;		#REQUIRED
	is_taxable		%Boolean;		"false" 
	line_num		%Integer;		#REQUIRED >
	
<!ELEMENT	CustomerInvoiceReference 		EMPTY >
<!ATTLIST	CustomerInvoiceReference 
	tran_id			%CustInvRef29;		#REQUIRED
	payment			%Money12_2;		#REQUIRED >

<!ELEMENT	CustomerPayment		((CustomerInvoiceReference|CreditMemoReference)+) >
<!ATTLIST	CustomerPayment
	tran_id			%PayDef10;		#REQUIRED
	customer		%CustomerRef41;		#REQUIRED
	customer_job		%CustomerJobRef41;	#IMPLIED
	amount			%Money12_2;		#REQUIRED
	date			%DateType;		#REQUIRED
	pay_method		%PayMethodRef13;	#IMPLIED
	memo			%String99;		#IMPLIED
	check_num		%String29;		#IMPLIED
	credit_card_num		%String18;		#IMPLIED
	credit_card_exp		%DateType;		#IMPLIED
	name_on_card		%String18;		#IMPLIED
	card_zipcode		%String10;		#IMPLIED
	chg_credit_card		%Boolean;		"false"
	cc_approved		%Boolean;		"false"
	deposit_to		%AccountRef31;		#IMPLIED > 

<!ELEMENT	CustomerPaymentReference 		EMPTY >
<!ATTLIST	CustomerPaymentReference 
	tran_id			%PayRef10;		#REQUIRED
	payment			%Money12_2;		#REQUIRED >

<!ELEMENT	CustomerRefund		((CustomerInvoiceItem|CustomerInvoiceReference)+) >
<!ATTLIST	CustomerRefund
	tran_id			%CustRefundDef29;	#IMPLIED
	account			%AccountRef31;		#IMPLIED
	pay_method		%PayMethodRef13;	#IMPLIED
	customer		%CustomerRef41;		#REQUIRED
	customer_job		%CustomerJobRef41;	#IMPLIED
	bill_address		%MultiLineString999;	#IMPLIED
	to_be_printed		%Boolean;		"false"
	date			%DateType;		#REQUIRED	
	memo			%String99;		#IMPLIED
	check_num		%String29;		#IMPLIED
	credit_card_num		%String18;		#IMPLIED
	credit_card_exp		%DateType;		#IMPLIED
	name_on_card		%String18;		#IMPLIED
	card_zipcode		%String10;		#IMPLIED
	refund_credit_card	%Boolean;		"false"
	cc_approved		%Boolean;		"false"
	amount			%Money12_2;		#REQUIRED >
	
<!ELEMENT	CustomerRefundReference 		EMPTY >
<!ATTLIST	CustomerRefundReference 
	tran_id			%CustRefundRef29;	#REQUIRED
	amount			%Money12_2;		#REQUIRED >	 

<!ELEMENT	ExpenseReport	(ExpenseItem+) >
<!ATTLIST	ExpenseReport
	tran_id			%ExpReportDef29;	#IMPLIED
	employee		%EmployeeRef41;		#REQUIRED	
	date			%DateType;		#REQUIRED
	due_date		%DateType;		#IMPLIED
	exp_total		%Money12_2;		#REQUIRED
	adv_apply		%Money12_2;		#IMPLIED
	amount			%Money12_2;		#IMPLIED
	purpose			%String99;		#IMPLIED
	is_approved		%Boolean;		"false"	>
<!-- tran_id is Expense Report # field in the user interface -->

<!ELEMENT	ExpenseItem		EMPTY >
<!ATTLIST	ExpenseItem
	line_num		%Integer;		#REQUIRED
	date			%DateType;		#REQUIRED
	category		%ExpenseRef31;		#REQUIRED
	amount			%Money12_2;		#REQUIRED
	memo			%String99;		#IMPLIED
	class			%ClassRef31;		#IMPLIED
	customer		%CustomerRef41;		#IMPLIED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_billable		%Boolean;		"false"
	billed			%Boolean;		"false"
	is_receipt		%Boolean;		"false" >

<!ELEMENT	JournalEntry		(JournalItem+) >
<!ATTLIST	JournalEntry
	tran_id			%JEDef10;		#IMPLIED
	date			%DateType;		#REQUIRED
	is_reconciled		%Boolean;		"false" >
<!-- tran_id is Entry # field in the user interface -->
	
<!ELEMENT	JournalItem		EMPTY	 >
<!ATTLIST	JournalItem
	line_num		%Integer;		#REQUIRED
	account			%AccountRef31;		#REQUIRED
	entry_type		(debit|credit)		#REQUIRED
	amount			%Money12_2;		#REQUIRED
	memo			%String99;		#IMPLIED
	name			%EntityRef;		#IMPLIED
	class			%ClassRef31;		#IMPLIED >
	
<!ELEMENT	PurchaseOrder	(PurchaseItem+) >
<!ATTLIST	PurchaseOrder
	tran_id			%PODef29;		#IMPLIED
	vendor			%VendorRef41;		#REQUIRED
	class			%ClassRef31;		#IMPLIED
	memo			%String99;		#IMPLIED
	ship_to			%CustomerRef41;		#IMPLIED
	to_be_printed		%Boolean;		"false"
	to_be_emailed		%Boolean;		"false"
	email			%String64;		#IMPLIED
	vendor_address		%MultiLineString999;	#IMPLIED
	ship_to_address		%MultiLineString999;	#IMPLIED
	date			%DateType;		#REQUIRED
	receipt_date		%DateType;		#REQUIRED
	ship_via		%ShipMethodRef15;	#IMPLIED
	vendor_num		%String29;		#IMPLIED
	vendor_msg		%String99;		#IMPLIED
	amount			%Money12_2;		#REQUIRED
	is_received		%Boolean;		#IMPLIED >
<!-- tran_id is PO # field in the user interface -->

<!ELEMENT	PurchaseItem		EMPTY >
<!ATTLIST	PurchaseItem
	line_num		%Integer;		#REQUIRED
	item			%ItemRef13;		#REQUIRED
	qty_ordered		%Float10_5;		#IMPLIED
	qty_received		%Float10_5;		#IMPLIED
	description		%String99;		#IMPLIED
	rate			%Float10_5;		#IMPLIED
	amount			%Money12_2;		#REQUIRED
	customer		%CustomerRef41;		#IMPLIED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_billable		%Boolean;		"false"
	is_received		%Boolean;		"false"	
	is_closed		%Boolean;		"false"
	billed			%Boolean;		"false" >

<!ELEMENT	TimeTracking	EMPTY >
<!ATTLIST	TimeTracking	
	tran_id			%TimeTrackingDef99;	#REQUIRED
	employee		%EmployeeRef41;		#REQUIRED
	date			%DateType;		#REQUIRED
	customer		%CustomerRef41;		#REQUIRED
	customer_job		%CustomerJobRef41;	#IMPLIED
	is_billable		%Boolean;		"true"
	service_item		%ServiceItemRef13;	#REQUIRED
	class			%ClassRef31;		#IMPLIED
	duration		%Float10_5;		#REQUIRED
	memo			%String99;		#IMPLIED
	billed			%Boolean;		"false" >

<!ELEMENT	TimeTrackReference		EMPTY >
<!ATTLIST	TimeTrackReference
	tran_id			%TimeTrackingRef99;	#REQUIRED >
	
<!ELEMENT	VendorCredit		((TranExpense|TranItem|BillReference)+) >
<!ATTLIST	VendorCredit
	tran_id			%VendorCreditDef10;	#IMPLIED  
	vendor			%VendorRef41;		#REQUIRED	
	date			%DateType;		#REQUIRED
	amount			%Money12_2;		#REQUIRED
	memo			%String99;		#IMPLIED >
	
<!ELEMENT	Check		((TranExpense|TranItem|BillReference|CustomerRefundReference)+) >
<!ATTLIST	Check
	tran_id			%CheckDef10;		#IMPLIED
	account			%AccountRef31;		#REQUIRED
	payee			%EntityRef;		#IMPLIED
	date			%DateType;		#REQUIRED	
	address			%MultiLineString999;	#IMPLIED
	amount			%Money12_2;		#REQUIRED
	memo			%String99;		#IMPLIED
	to_be_printed		%Boolean;		"false"
	is_reconciled		%Boolean;		"false" >
<!-- tran_id is Check # field in the user interface -->

<!ELEMENT	CreditCardPurchase	((TranExpense|TranItem)+) >
<!ATTLIST	CreditCardPurchase
	tran_id			%ChargeCCDef10;		#IMPLIED
	account			%AccountRef31;		#REQUIRED
	type			(charge|credit)		#REQUIRED
	date			%DateType;		#REQUIRED	
	vendor			%VendorRef41;		#IMPLIED
	amount			%Money12_2;		#REQUIRED
	memo			%String99;		#IMPLIED
	is_reconciled		%Boolean;		"false" >
 <!-- If charge is false this is a credit transaction -->

<!ELEMENT	Deposit		(DepositItem|CustomerPaymentReference|CashSaleReference)+ >
<!ATTLIST	Deposit
	account			%AccountRef31;		#REQUIRED
	date			%DateType;		#REQUIRED
	memo			%String99;		#IMPLIED
	amount			%Money12_2;		#REQUIRED >	
<!--NOTE: In addition to deposit items, Deposits can also include Payments from Customers
and Cash Sales.  These items must currently be undeposited.  They need to be deposited
before they can be reconciled.-->

<!ELEMENT	DepositItem		EMPTY >
<!ATTLIST	DepositItem
	tran_id			%DepositDef10;		#IMPLIED
	payor			%EntityRef;		#IMPLIED
	amount			%Money12_2;		#REQUIRED
	account			%AccountRef31;		#IMPLIED
	pay_method		%PayMethodRef13;	#IMPLIED
	class			%ClassRef31;		#IMPLIED
	memo			%String99;		#IMPLIED 
	is_reconciled		%Boolean;		"false" >

<!ELEMENT	Transfer		EMPTY >
<!ATTLIST	Transfer
	tran_id			%TransferDef29;		#IMPLIED
	date			%DateType;		#REQUIRED
	from_account		%AccountRef31;		#REQUIRED
	to_account		%AccountRef31;		#REQUIRED
	amount			%Money12_2;		#REQUIRED
	memo			%String99;		#IMPLIED
	is_reconciled		%Boolean;		"false" >