<?xml version="1.0" encoding="utf-8" ?>
<c:Screen xmlns:c="BitMobile.Controls" xmlns:s="BitMobile.ValueStack" xmlns:d="DefaultScope" StyleSheet="Order_Info.css">

	<s:Push Id="order" Value="$workflow.order" />
	<s:Push Id="sum" Value="$param1" />
	<s:Push Id="executedOrder" Value="$param2" />
	<s:Push Id="priceLists" Value="$GetPriceListQty($order.Outlet)" />

	<c:DockLayout>

		<c:HorizontalLayout CssClass="margin_top" />
		<c:HorizontalLine />

		<c:HorizontalLayout Id="btnDone" CssClass="bottom_btn" OnEvent="Back" OnClickAction="$Workflow.DoBack()">
			<c:TextView Text="#ready#" />
		</c:HorizontalLayout>
		<c:HorizontalLine CssClass="b_line" />

		<c:ScrollView Id="grScrollView">

			<c:DockLayout CssClass="parameter_grid">
				<c:TextView Text="#totalamount#" />
				<c:TextView Text="$sum" CssClass="value" />
			</c:DockLayout>
			<c:HorizontalLine />

			<s:If Test="$workflow.name!='Visit'">
				<c:DockLayout CssClass="parameter_grid" OnClickAction="$SetDeliveryDateDialog($workflow.order, $deliveryDate, $executedOrder)">
					<c:TextView Text="#deliveryDate#" />
					<c:TextView Id="deliveryDate" Text="$workflow.order.DeliveryDate" CssClass="value" />
				</c:DockLayout>
				<c:HorizontalLine />
			</s:If>

			<c:HorizontalLayout CssClass="grid" OnClickAction="$SelectPriceListIfIsNew($workflow.order, $priceLists, $executedOrder)">
				<c:VerticalLayout>
					<c:TextView Text="#priceList#" CssClass="description_row"/>
					<s:If Test="$NotEmptyRef($workflow.order.PriceList)">
						<c:TextView Id="priceListTextView" Text="$workflow.order.PriceList.Description" CssClass="main_row"/>
					</s:If>
					<s:Else>
						<s:If Test="$priceLists == 0">
							<c:TextView Text="#noPriceLists#" CssClass="main_row"/>
						</s:If>
						<s:Else>
							<c:TextView Text="#isntSelected#" CssClass="main_row"/>
						</s:Else>
					</s:Else>
				</c:VerticalLayout>
			</c:HorizontalLayout>
			<c:HorizontalLine />

			<s:If Test="$sessionConst.MultStck">
				<c:DockLayout CssClass="parameter_grid" OnClickAction="$SelectStock($workflow.order, Stock, $stockDescription)">
					<c:TextView Text="#stockPlace#" />
					<c:TextView Id="stockDescription" Text="$GetStockDescription($workflow.order.Stock)" CssClass="value" />
				</c:DockLayout>
				<c:HorizontalLine />
			</s:If>

				<c:HorizontalLayout CssClass="memo_block">
					<c:VerticalLayout>
						<c:TextView Text="#commentary#" CssClass="description_row" />
						<s:If Test="$IsEditable($executedOrder, $order)">
							<c:MemoEdit Value="$order.Commentary" CssClass="main_row" />
						</s:If>
						<s:Else>
							<c:TextView Text="$order.Commentary" CssClass="main_row" />
						</s:Else>
					</c:VerticalLayout>
				</c:HorizontalLayout>
				<c:HorizontalLine />

		</c:ScrollView>

	</c:DockLayout>

</c:Screen>



