<?xml version="1.0" encoding="UTF-8"?>
<!--
@author Last Changed:$Author: Chandrasekhar Y. $
@version $Revision: 1 $
@date $Date: 2011-11-17 $
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bod="http://schema.infor.com/InforOAGIS/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:saxon="http://xml.apache.org/saxon" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ext="com.infor.tfs.mappings.extensions.XsltExt" xmlns:java="http://xml.apache.org/saxon/java" xmlns:tfs="http://www.infor.com/tfs" exclude-result-prefixes="java">
	<!---->
	<!-- imports -->
	<xsl:import href="includes/StockInterface_segments.xsl" xml:base="../../"/>
	<xsl:import href="includes/functions/trimLeft.xsl" xml:base="../../"/>
	<xsl:import href="includes/functions/trimRight.xsl" xml:base="../../"/>
	<!---->
	<xsl:decimal-format name="qtyFrmt" decimal-separator="," grouping-separator=" "/>
	<xsl:output indent="yes" method="xml" encoding="UTF-8"/>
	<!---->
	<!--****************************************************************************************************-->
	<!-- Root -->
	<!--****************************************************************************************************-->
	<!--<xsl:template match="/">
		<xsl:apply-templates select="bod:SyncHICOMInventoryStock"/>
	</xsl:template>-->
	<!---->
	<!--****************************************************************************************************-->
	<!-- SyncHICOMInventoryStock -->
	<!--****************************************************************************************************-->
	<xsl:template match="bod:SyncHICOMInventoryStock">
		<xsl:element name="STKINT">
			<!--****************************************************************************************************-->
			<!-- Segment S001 -->
			<!--****************************************************************************************************-->
			<xsl:message select="concat('the first :::: ' , bod:DataArea/bod:HICOMInventoryStock/bod:postingProcedure)"/>
			<xsl:call-template name="S01">
				<!--<xsl:with-param name="documentDate" select="tfs:getBODDate(/bod:DataArea/bod:HICOMInventoryStock/bod:documentDateTime)"/>-->
				<xsl:with-param name="postingDate" select="tfs:getBODDate(bod:DataArea/bod:HICOMInventoryStock/bod:documentDateTime)"/>
				<!--<xsl:with-param name="referenceDocument" select=""/>
				<xsl:with-param name="documentHeader" select=""/>
				<xsl:with-param name="consignmentNumber" select=""/>
				<xsl:with-param name="receiptIssueSlipNumber" select=""/>
				<xsl:with-param name="currentTransactioncode" select=""/>
				<xsl:with-param name="materialDocumentNumber" select=""/>-->
				<xsl:with-param name="postingProcedure" select="bod:DataArea/bod:HICOMInventoryStock/bod:postingProcedure"/>
				<!--<xsl:with-param name="shipmentNote" select=""/>
				<xsl:with-param name="deliveryNote" select=""/>
				<xsl:with-param name="shippingType" select=""/>
				<xsl:with-param name="postingDateTwo" select=""/>
				<xsl:with-param name="customsIndicator" select=""/>
				<xsl:with-param name="noOfCollisions" select=""/>
				<xsl:with-param name="consignmentDate" select=""/>
				<xsl:with-param name="receiptDate" select=""/>-->
				<xsl:with-param name="indicatorOfPostingContainer" select="bod:DataArea/bod:HICOMInventoryStock/bod:indicatorOfPostingContainer"/>
				<!--<xsl:with-param name="user" select=""/>
				<xsl:with-param name="transportKey" select=""/>
				<xsl:with-param name="transportIndicator" select=""/>
				<xsl:with-param name="bordereauNumber" select=""/>
				<xsl:with-param name="bordereauDate" select=""/>
				<xsl:with-param name="carrier" select=""/>
				<xsl:with-param name="entryStatus" select=""/>
				<xsl:with-param name="extraTourNumber" select=""/>
				<xsl:with-param name="freightCarrierNumber" select=""/>
				<xsl:with-param name="containerIndicatorTwo" select=""/>
				<xsl:with-param name="shipmentSizeKey" select=""/>
				<xsl:with-param name="receiptDateTwo" select=""/>
				<xsl:with-param name="departureDate" select=""/>
				<xsl:with-param name="customerReceiptTime" select=""/>
				<xsl:with-param name="customerdepartureTime" select=""/>
				<xsl:with-param name="shipmentReferenceNumber" select=""/>
				<xsl:with-param name="vendorPostalCode" select=""/>
				<xsl:with-param name="vendorPostalCodeAdvice" select=""/>
				<xsl:with-param name="shipmentKey" select=""/>
				<xsl:with-param name="shipmentWeight" select=""/>
				<xsl:with-param name="" select=""/>
				<xsl:with-param name="indicatorItemProcessed" select=""/>
				<xsl:with-param name="indicatorCancellation" select=""/>-->
				<xsl:with-param name="materialNumberCardFormat" select="concat(' ',tfs:trimLeft(tfs:trimRight((bod:DataArea/bod:HICOMInventoryStock/bod:DocumentID/bod:ID))))"/>
				<!--<xsl:with-param name="plantSAP" select=""/>
				<xsl:with-param name="vWStorageLocation" select=""/>
				<xsl:with-param name="batchNumber" select=""/>
				<xsl:with-param name="movementType" select=""/>
				<xsl:with-param name="stockType" select=""/>
				<xsl:with-param name="specialStockIndicator" select=""/>
				<xsl:with-param name="consumptionPosting" select=""/>
				<xsl:with-param name="vendorAccountNumber" select=""/>
				<xsl:with-param name="accountNumberofCustomer" select=""/>
				<xsl:with-param name="salesOrderNumber" select=""/>
				<xsl:with-param name="itemNumberSalesOrder" select=""/>
				<xsl:with-param name="deliveryScheduleSalesOrder" select=""/>-->
				<xsl:with-param name="debitCreditIndicator" select="bod:DataArea/bod:HICOMInventoryStock/bod:debitCreditIndicator"/>
				<!--<xsl:with-param name="currencyKey" select=""/>
				<xsl:with-param name="amountLocalCurrency" select=""/>
				<xsl:with-param name="valuationType" select=""/>
				<xsl:with-param name="quantityUnitofEntry" select=""/> -->
				<xsl:with-param name="unitofEntry" select="bod:DataArea/bod:HICOMInventoryStock/bod:availableStock/@unitCode"/>
				<!-- <xsl:with-param name="quantityPurchaseOrderPriceUnit" select=""/>
				<xsl:with-param name="orderPriceUnit" select=""/>-->
				<xsl:with-param name="purchaseOrderNumber" select="bod:DataArea/bod:HICOMInventoryStock/bod:purchaseOrder"/>
				<!--<xsl:with-param name="itemNumberPurchasingDocument" select=""/>
				<xsl:with-param name="deliveryCompletedIndicator" select=""/>
				<xsl:with-param name="itemText" select=""/>
				<xsl:with-param name="transferID" select=""/>
				<xsl:with-param name="dunsNumber" select=""/>
				<xsl:with-param name="filler01" select=""/>
				<xsl:with-param name="goodsRecipientShipToParty" select=""/>
				<xsl:with-param name="unloadingPoint" select=""/>
				<xsl:with-param name="costCenter" select=""/>
				<xsl:with-param name="orderNumber" select=""/>
				<xsl:with-param name="mainAssetNumber" select=""/>
				<xsl:with-param name="assetSubnumber" select=""/>
				<xsl:with-param name="numberOfReservationDependentRequirement" select=""/>
				<xsl:with-param name="itemNumberReservationDependentRequirement" select=""/>
				<xsl:with-param name="filler02" select=""/>
				<xsl:with-param name="finalIssueReservation" select=""/>
				<xsl:with-param name="receivingIssuingMaterial" select=""/>
				<xsl:with-param name="filler03" select=""/>-->
				<xsl:with-param name="receivingIssuingPlant" select="bod:DataArea/bod:HICOMInventoryStock/bod:warehousePlant"/>
				<!--<xsl:with-param name="receivingIssuingStorageLocation" select=""/>
				<xsl:with-param name="receivingIssuingBatch" select=""/>
				<xsl:with-param name="movementIndicator" select=""/>
				<xsl:with-param name="goodsReceiptNonValuated" select=""/>
				<xsl:with-param name="warehouseNumberWarehouseComplex" select=""/>
				<xsl:with-param name="storageType" select=""/>
				<xsl:with-param name="storageBin" select=""/>
				<xsl:with-param name="reasonMovement" select=""/>
				<xsl:with-param name="shippingInstructions" select=""/>
				<xsl:with-param name="" select=""/>
				<xsl:with-param name="kRIASRecordType" select=""/>
				<xsl:with-param name="companyNumber" select=""/>
				<xsl:with-param name="objectType" select=""/>
				<xsl:with-param name="priceUnit" select=""/>
				<xsl:with-param name="priceDocumentCurrency" select=""/>
				<xsl:with-param name="invoicedgoodsActivity" select=""/>
				<xsl:with-param name="signInvoicedgoodsActivity" select=""/>
				<xsl:with-param name="vWStorageLocationTwo" select=""/>
				<xsl:with-param name="estimatedPriceIndicator" select=""/>
				<xsl:with-param name="orderType" select=""/>
				<xsl:with-param name="priceIndicator" select=""/>
				<xsl:with-param name="valueDate" select=""/>
				<xsl:with-param name="paymentTerms" select=""/>
				<xsl:with-param name="termsofDelivery" select=""/>
				<xsl:with-param name="verificationDate" select=""/>
				<xsl:with-param name="logisticCostIndicator" select=""/>
				<xsl:with-param name="storageLocationUnloadingPoint" select=""/>
				<xsl:with-param name="deliveryNoteItemNumber" select=""/>
				-->
				<xsl:with-param name="vWStockPlant" select="bod:DataArea/bod:HICOMInventoryStock/bod:stockPlant"/>
				<!--<xsl:with-param name="countryOfOrigin" select=""/>-->
				<xsl:with-param name="vWWarehousePlant" select="bod:DataArea/bod:HICOMInventoryStock/bod:warehousePlant"/>
				<xsl:with-param name="vWWarehouseNumber" select="bod:DataArea/bod:HICOMInventoryStock/bod:warehouseNumber"/>
				<xsl:with-param name="vWWarehouseGroup" select="bod:DataArea/bod:HICOMInventoryStock/bod:warehouseGroup"/>
				<!--<xsl:with-param name="transportDamageIndicator" select=""/>
				<xsl:with-param name="deliveryNoteTwo" select=""/>
				<xsl:with-param name="materialGroup" select=""/>
				<xsl:with-param name="containerItem" select=""/>
				<xsl:with-param name="numberOfContainer" select=""/>
				<xsl:with-param name="contentOfContainer" select=""/>
				<xsl:with-param name="containerType" select=""/>
				<xsl:with-param name="grossWeight" select=""/>
				<xsl:with-param name="counterContainerItem" select=""/>
				<xsl:with-param name="containerID" select=""/>
				<xsl:with-param name="componentSupplier" select=""/>-->
				<xsl:with-param name="activityCategory" select="bod:DataArea/bod:HICOMInventoryStock/bod:activityCategory"/>
				<xsl:with-param name="usageIndicator" select="bod:DataArea/bod:HICOMInventoryStock/bod:usageIndicator"/>
				<!--<xsl:with-param name="controlCommandGoodsReceipt" select=""/>
				<xsl:with-param name="sUMDVS" select=""/>
				<xsl:with-param name="iDocNumber" select=""/> -->
				<xsl:with-param name="partner" select="bod:DataArea/bod:HICOMInventoryStock/bod:partner"/>
				<!-- <xsl:with-param name="specialDocument" select=""/>-->
				<xsl:with-param name="stock" select="bod:DataArea/bod:HICOMInventoryStock/bod:availableStock"/>
				<!--<xsl:with-param name="account" select=""/>-->
				<xsl:with-param name="timestamp" select="tfs:getBODDate(bod:DataArea/bod:HICOMInventoryStock/bod:documentDateTime, 'yyyyMMddHHmmss')"/>
				<xsl:with-param name="interfaceProvidingIndicator" select="bod:DataArea/bod:HICOMInventoryStock/bod:interfaceProvidingIndicator"/>
				<!--<xsl:with-param name="vendorAccountNumberJITCall" select=""/>-->
				<xsl:with-param name="stockUnfree" select="bod:DataArea/bod:HICOMInventoryStock/bod:stockUnfree"/>
				<xsl:with-param name="interfaceProvidingIndicatorMABES" select="bod:DataArea/bod:HICOMInventoryStock/bod:interfaceProvidingIndicatorMABES"/>
				<!-- <xsl:with-param name="filler2" select=""/>-->
			</xsl:call-template>
		</xsl:element>
	</xsl:template>
</xsl:stylesheet>
