<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Mark Avery McCuistion (Development) -->
<!-- Changes to version 0.4
	* using referece to BOL version 1.2. Fixes the totals node, make quantity required and other elements optional
	* remove billOfLaiding node. This informaiton can be represented with invoiceReferenceNumbers
	* renamed invoiceCharge to lineCharge in detail section. Made it required atleast 1 time.
	* added invoiceCharge which is the same type as lineCharge at header level. This is an optional element but can be repeated multiple times
	* made quantity at line level required element
	* removed invoiceAdditionalCharge from header and invoiceLineAdditionCharge from detail. These can be represented with invoiceCharge and lineCharge respectively. Hence the invoiceCharge and lineCharge can appear multiple times.
	* Changed annotation on rateType with FrieghtCharge to describe more clearly what it is. Added Weight, and DeclaredValue in enumeration
	* Added description in FreightCharge, this will describe what type of charge it is.
-->
<!-- Updating from 0.4 to version 1.0 after approval
	* changed lineAmount to amount in charges informaiton
	* change annotation for that as well -->
<schema targetNamespace="http://xmc.eximtechnologies.com/xml/schemas/fidx/FurnFreightInvoice_v1.0" xmlns:furnFreightInvoice="http://xmc.eximtechnologies.com/xml/schemas/fidx/FurnFreightInvoice_v1.0" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:furnBOL="http://xmc.eximtechnologies.com/xml/schemas/fidx/FurnBOL_v1.2" xmlns:fnBase="http://support.furnishnet.com/xml/schemas/fnBase_v1.5" xmlns:fnItem="http://support.furnishnet.com/xml/schemas/fnItem_v1.5" xmlns:fnParty="http://support.furnishnet.com/xml/schemas/fnParty_v1.4">
	<import namespace="http://support.furnishnet.com/xml/schemas/fnBase_v1.5" schemaLocation="http://support.furnishnet.com/xml/schemas/fn_base_v1.5.xsd"/>
	<import namespace="http://support.furnishnet.com/xml/schemas/fnParty_v1.4" schemaLocation="http://support.furnishnet.com/xml/schemas/fn_party_v1.4.xsd"/>
	<import namespace="http://xmc.eximtechnologies.com/xml/schemas/fidx/FurnBOL_v1.2" schemaLocation="http://xmc.eximtechnologies.com/xml/schemas/fidx/FurnBOL_v1.2.xsd"/>
	<import namespace="http://support.furnishnet.com/xml/schemas/fnItem_v1.5" schemaLocation="http://support.furnishnet.com/xml/schemas/fn_item_v1.5.xsd"/>
	<element name="freightInvoice">
		<annotation>
			<documentation>Root Element and starting point for a Freight Invoice</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="invoice" type="furnFreightInvoice:InvoiceInformation">
					<annotation>
						<documentation>Information that is relevant to the whole invoice.</documentation>
					</annotation>
				</element>
				<element name="line" minOccurs="0" maxOccurs="unbounded">
					<complexType>
						<complexContent>
							<extension base="furnFreightInvoice:LineInformation">
								<attribute name="lineNumber" type="positiveInteger" use="required"/>
								<attribute name="comment" type="string" use="optional"/>
							</extension>
						</complexContent>
					</complexType>
				</element>
			</sequence>
		</complexType>
	</element>
	<complexType name="InvoiceInformation">
		<annotation>
			<documentation>General information about the invoice.</documentation>
		</annotation>
		<sequence>
			<element name="document" type="fnBase:documentType">
				<annotation>
					<documentation>Basic document information which identifies all documents of the FIDX schema</documentation>
				</annotation>
			</element>
			<element name="billTo" type="fnParty:partyIdentificationType">
				<annotation>
					<documentation>Party being billed</documentation>
				</annotation>
			</element>
			<element name="biller" type="fnParty:partyIdentificationType">
				<annotation>
					<documentation>Carrier sending the bill</documentation>
				</annotation>
			</element>
			<element name="paymentMethod">
				<annotation>
					<documentation>Method of payment and description</documentation>
				</annotation>
				<complexType>
					<attribute name="methodOfPayment" use="required">
						<simpleType>
							<restriction base="string">
								<enumeration value="SellerPrepaid"/>
								<enumeration value="BuyerPrepaid"/>
								<enumeration value="Collect"/>
								<enumeration value="Other"/>
							</restriction>
						</simpleType>
					</attribute>
					<attribute name="description" type="string" use="optional"/>
				</complexType>
			</element>
			<element name="dates" type="furnFreightInvoice:invoiceDateTypes" maxOccurs="unbounded">
				<annotation>
					<documentation>Different types of dates</documentation>
				</annotation>
			</element>
			<element name="standardCarrierAlphaCode" type="string">
				<annotation>
					<documentation>SCAC code. Unique identifier of carriers</documentation>
				</annotation>
			</element>
			<element name="currency" type="fnBase:currencyIdentifierType">
				<annotation>
					<documentation>Identifies the Currency for the amounts on the invoice</documentation>
				</annotation>
			</element>
			<element name="invoiceAmount" type="fnBase:monetaryAmountType">
				<annotation>
					<documentation>Invoice Amount being charged for this frieght.</documentation>
				</annotation>
			</element>
			<element name="equipmentDetails" type="furnBOL:EquipmentInfo">
				<annotation>
					<documentation>equipment details that this Freight was carried on</documentation>
				</annotation>
			</element>
			<element name="shipper" type="fnParty:partyIdentificationType" minOccurs="0">
				<annotation>
					<documentation>Who the shipper is of the freight that this invoice is for</documentation>
				</annotation>
			</element>
			<element name="consignee" type="fnParty:partyIdentificationType" minOccurs="0">
				<annotation>
					<documentation>Who received the freight</documentation>
				</annotation>
			</element>
			<element name="totals" type="furnBOL:BOLTotalsSummary" minOccurs="0">
				<annotation>
					<documentation>totals for this invoice. Like total invoice amount, weight, volume etc.</documentation>
				</annotation>
			</element>
			<element name="invoiceReferenceNumbers" type="fnBase:referenceNumberType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Reference numbers to identify this invoice</documentation>
				</annotation>
			</element>
			<element name="invoiceSystemReference" type="fnBase:systemReferenceType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Other reference numbers not specified in invoiceReferenceNumbers</documentation>
				</annotation>
			</element>
			<element name="invoiceDiscount" type="fnBase:discountOrAllowanceType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Any discounts on the invoice</documentation>
				</annotation>
			</element>
			<element name="invoiceCharge" type="furnFreightInvoice:FreightCharge" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<complexType name="LineInformation">
		<annotation>
			<documentation>Detailed line level information</documentation>
		</annotation>
		<sequence>
			<element name="lineItem" type="fnItem:itemIdentifierType" minOccurs="0">
				<annotation>
					<documentation>Item characteristics like weight, volume</documentation>
				</annotation>
			</element>
			<element name="quantity" type="fnBase:quantityType">
				<annotation>
					<documentation>Quantity of the items shipped</documentation>
				</annotation>
			</element>
			<element name="lineCharge" type="furnFreightInvoice:FreightCharge" maxOccurs="unbounded">
				<annotation>
					<documentation>Invoice amount and related information like rate for this line item</documentation>
				</annotation>
			</element>
			<element name="invoiceLineSystemReference" type="fnBase:systemReferenceType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>System reference to be used when the reference numbers is not able to capture the information required. This is understood by the systems of sender and receiver</documentation>
				</annotation>
			</element>
			<element name="invoiceLineDiscount" type="fnBase:discountOrAllowanceType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>any discounts or allowance</documentation>
				</annotation>
			</element>
			<element name="invoiceLineReferenceNumber" type="fnBase:referenceNumberType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Reference numbers for this invoice line item.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="invoiceDateTypes">
		<annotation>
			<documentation>Different types of dates for the invoice</documentation>
		</annotation>
		<sequence>
			<element name="dateType">
				<annotation>
					<documentation>Enumeration of different date types that can be sent when sending a freight invoice</documentation>
				</annotation>
				<simpleType>
					<restriction base="string">
						<enumeration value="Invoice"/>
						<enumeration value="Ship"/>
						<enumeration value="Delivery"/>
						<enumeration value="Other"/>
					</restriction>
				</simpleType>
			</element>
			<element name="date" type="date">
				<annotation>
					<documentation>Date</documentation>
				</annotation>
			</element>
			<element name="time" type="time">
				<annotation>
					<documentation>Time</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="FreightCharge">
		<annotation>
			<documentation>charge, rate, rate type and rate description</documentation>
		</annotation>
		<sequence>
			<element name="freightRate" type="decimal">
				<annotation>
					<documentation>Rate at which the freight is charged</documentation>
				</annotation>
			</element>
			<element name="amount" type="fnBase:monetaryAmountType">
				<annotation>
					<documentation>Actual charge not including the additional charges, allownace and discounts.</documentation>
				</annotation>
			</element>
			<element name="rateType">
				<annotation>
					<documentation>what type of rate has been applied. Is it a Flat rate, a percentage of invoice, based on volum, weight etc.</documentation>
				</annotation>
				<complexType>
					<attribute name="type" use="required">
						<simpleType>
							<restriction base="string">
								<enumeration value="InvoiceAmount"/>
								<enumeration value="Flat"/>
								<enumeration value="DeclaredAmount"/>
								<enumeration value="Weight"/>
								<enumeration value="Volume"/>
								<enumeration value="Other"/>
							</restriction>
						</simpleType>
					</attribute>
					<attribute name="description" type="string" use="optional"/>
				</complexType>
			</element>
			<element name="rateQuantity" type="fnBase:quantityType" minOccurs="0">
				<annotation>
					<documentation>Quantity that the rate is applied to.</documentation>
				</annotation>
			</element>
			<element name="description" type="string" minOccurs="0">
				<annotation>
					<documentation>Description of the charge. This conveys what the charge is for. Freight charge, fuel surcharge, insurance surcharge etc.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
</schema>
