<html>
<head id="Head1" runat="server">
<title>TransferRequisition-TransferRequisition</title>
<script runat="server">
public void Page_Load(Object sender, EventArgs e)
{
if (!IsPostBack && !X.IsAjaxRequest)
{
ResourceManager.GetInstance(this.Page).RegisterIcon(Icon.Building);
ResourceManager.GetInstance(this.Page).RegisterIcon(Icon.Group);
}
}
</script>
<style type="text/css">
.x-form-group .x-form-group-header-text
{
background-color: #dfe8f6;
}
.x-menu.x-menu-horizontal .x-menu-list
{
overflow: auto;
}
</style>
</head>
<body>
<ext:ResourceManager runat="server" ID="TransferReqResrcMgr" ShowWarningOnAjaxFailure="false">
</ext:ResourceManager>
<ext:Store ID="dsSaveTransferRequisition" runat="server" AutoLoad="false" SaveAllFields="true">
<Reader>
<ext:JsonReader Root="data">
<Fields>
<ext:RecordField Name="RequisitionID" />
<ext:RecordField Name="RequisitionNo" />
<ext:RecordField Name="Status" />
<ext:RecordField Name="DestinationLocation" />
<ext:RecordField Name="DestinationLocationName" />
<ext:RecordField Name="DestinationLocationID" />
<ext:RecordField Name="SourceLocation" />
<ext:RecordField Name="SourceLocationName" />
<ext:RecordField Name="SourceLocationID" />
<ext:RecordField Name="Note" />
<ext:RecordField Name="DueDate" />
<ext:RecordField Name="LoggedInUserId" />
<ext:RecordField Name="LoggedInCompId" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<Load Handler=" LoadStockingLocationAndDestinationLocationStores({destinationLocationStore : #{dsInventoryLocation}, sourceLocationStore : #{dsInvStockingLocation}, mainStore : #{dsSaveTransferRequisition}});" />
</Listeners>
</ext:Store>
<ext:Store ID="dsInventoryLocation" runat="server" AutoLoad="false" SaveAllFields="true">
<Proxy>
<ext:HttpProxy Url="/TransferRequisition/GetStockingLocationByLocationID" />
</Proxy>
<Reader>
<ext:JsonReader IDProperty="ID" Root="data">
<Fields>
<ext:RecordField Name="ID" />
<ext:RecordField Name="Name" />
<ext:RecordField Name="LocationType" />
</Fields>
</ext:JsonReader>
</Reader>
<BaseParams>
<ext:Parameter Name="locID" Value='Ext.GLOBAL_STORE.SelectedLocationId' Mode="Raw"
AutoDataBind="true" />
<ext:Parameter Name="companyID" Value='Ext.GLOBAL_STORE.SelectedCompanyId' Mode="Raw"
AutoDataBind="true" />
<ext:Parameter Name="userID" Value='Ext.GLOBAL_STORE.UserId' Mode="Raw" AutoDataBind="true" />
<ext:Parameter Name="type" Value='Ext.GLOBAL_STORE.LocationType' Mode="Raw" AutoDataBind="true" />
<ext:Parameter Name="SearchText" Value="Ext.ItemSearchText" Mode="Raw" />
<ext:Parameter Name="start" Value="#{cmbDestinationLocation}.getParams().start" Mode="Raw" />
<ext:Parameter Name="limit" Value="#{cmbDestinationLocation}.getParams().limit" Mode="Raw" />
</BaseParams>
</ext:Store>
<ext:Store ID="dsInvStockingLocation" runat="server" AutoLoad="false" SaveAllFields="true">
<Proxy>
<ext:HttpProxy Url="/TransferRequisition/GetStockingLocationByCompanyByLoc" />
</Proxy>
<Reader>
<ext:JsonReader Root="data">
<Fields>
<ext:RecordField Name="ID" />
<ext:RecordField Name="Name" />
</Fields>
</ext:JsonReader>
</Reader>
<BaseParams>
<ext:Parameter Name="logUserId" Value='Ext.GLOBAL_STORE.UserId' Mode="Raw" AutoDataBind="true" />
<ext:Parameter Name="sourceLocIDSelected" Value='#{cmbDestinationLocation}.value'
Mode="Raw" AutoDataBind="true" />
<ext:Parameter Name="companyID" Value='Ext.GLOBAL_STORE.SelectedCompanyId' Mode="Raw"
AutoDataBind="true" />
<ext:Parameter Name="SearchText" Value="Ext.ItemSearchText" Mode="Raw" />
<ext:Parameter Name="start" Value="#{cmbSourceLocation}.getParams().start" Mode="Raw" />
<ext:Parameter Name="limit" Value="#{cmbSourceLocation}.getParams().limit" Mode="Raw" />
</BaseParams>
</ext:Store>
<ext:Viewport ID="vpTransfor" runat="server" Layout="border">
<Items>
<ext:Hidden runat="server" Text='<%# ViewBag.TransferRequisitionID %>' ID="hdnTransferRequisitionID"
AutoDataBind="true" />
<ext:FormPanel ID="pnlTransferReq" runat="server" MonitorResize="true" Region="Center"
AutoScroll="true" Border="false" BodyStyle="background-color: #DFE8F6" AnchorHorizontal="100%"
FormGroup="true" HeaderAsText="true" Padding="5">
<Items>
<ext:Container ID="CntrTransferReqEditView" runat="server" LabelAlign="Left" Layout="ColumnLayout"
AnchorHorizontal="100%" Height="20">
<Items>
<nxtwc:NxtPanel ID="CntrTranReqNumber" runat="server" LabelAlign="Left" Layout="Column"
ColumnWidth="0.5" AutoDataBind="true" PaddingSummary="0 5px 0" Border="false"
BodyStyle="background-color: #DFE8F6">
<Items>
<nxtwc:NxtLabel ID="lblTranReqNo" runat="server" AnchorHorizontal="100%" FieldLabel="ReqNo"
AnchorVertical="100%" ColumnWidth="0.5" LabelWidth="130" Width="400" />
</Items>
</nxtwc:NxtPanel>
<nxtwc:NxtPanel ID="CntrTranStatus" runat="server" LabelAlign="Left" Layout="FormLayout"
ColumnWidth="0.5" AutoDataBind="true" Border="false" BodyStyle="background-color: #DFE8F6">
<Items>
<nxtwc:NxtLabel ID="lblTranReqStatus" runat="server" LabelWidth="40" FieldLabel="ReqStatus"
AnchorHorizontal="100%" AnchorVertical="100%" />
</Items>
</nxtwc:NxtPanel>
</Items>
</ext:Container>
<ext:Container ID="CntrTransferReqHdr1" runat="server" Layout="ColumnLayout" Height="100">
<Items>
<ext:Container ID="CntrTransferReqHdr2" runat="server" LabelAlign="Left" Layout="FormLayout"
ColumnWidth="0.5" AutoDataBind="true">
<Items>
<nxtwc:NxtPanel runat="server" Layout="Column" ID="ContainerTransferRefno" Border="false"
BodyStyle="background-color: #DFE8F6" PaddingSummary="5px 5px 0">
</nxtwc:NxtPanel>
<nxtwc:NxtPanel runat="server" ID="pnlDestStockLoc" IDMode="Explicit" Border="false"
BodyStyle="background-color: #DFE8F6" AnchorHorizontal="100%" PaddingSummary="5px 5px 0">
<Items>
<nxtwc:NxtComboBox runat="server" ID="cmbDestinationLocation" DisplayField="Name"
StoreID="dsInventoryLocation" IDMode="Explicit" AllowBlank="false" IndicatorTip="This is mandatory."
IndicatorIcon="BulletRed" LabelAlign="Left" DataIndex="DestinationLocation" FieldLabel="DestinationLocation"
ValueField="ID" ForceSelection="true" LabelWidth="130" TypeAhead="true" Width="400"
Mode="Remote" Editable="true" TriggerAction="All" PageSize="10" HideTrigger="false"
MinChars="2" QueryDelay="3600000">
<Triggers>
<ext:FieldTrigger Icon="Search" HideTrigger="false" />
</Triggers>
<Listeners>
<KeyUp Handler="
if (e.getKey() == e.ENTER) {
Ext.ItemSearchText=this.getRawValue();#{dsInventoryLocation}.load(); }"/>
<TriggerClick Handler="
Ext.ItemSearchText=this.getRawValue();#{dsInventoryLocation}.load();
" />
<Select Handler = "#{cmbSourceLocation}.clearValue();
#{cmbSourceLocation}.getStore().removeAll()
#{cmbSourceLocation}.getStore().clearData();
Ext.apply(#{cmbSourceLocation}.getStore().baseParams, { logUserId: Ext.GLOBAL_STORE.UserId,sourceLocIDSelected:#{cmbDestinationLocation}.value,companyID:Ext.GLOBAL_STORE.SelectedCompanyId });
#{cmbSourceLocation}.getStore().load();
" />
</Listeners>
</nxtwc:NxtComboBox>
</Items>
</nxtwc:NxtPanel>
<nxtwc:NxtPanel runat="server" ID="pnlStockLoc" IDMode="Explicit" Border="false"
BodyStyle="background-color: #DFE8F6" AnchorHorizontal="100%" PaddingSummary="5px 5px 0">
<Items>
<nxtwc:NxtComboBox runat="server" ID="cmbSourceLocation" DisplayField="Name" IDMode="Explicit"
AllowBlank="false" IndicatorTip="This is mandatory." IndicatorIcon="BulletRed"
StoreID="dsInvStockingLocation" LabelAlign="Left" FieldLabel="SourceLocation"
Mode="Remote" ValueField="ID" ForceSelection="true" DataIndex="SourceLocation"
LabelWidth="130" TypeAhead="true" Width="400" Editable="true" TriggerAction="All"
PageSize="10" HideTrigger="false" MinChars="2" QueryDelay="3600000">
<Triggers>
<ext:FieldTrigger Icon="Search" HideTrigger="false" />
</Triggers>
<Listeners>
<KeyUp Handler="
if (e.getKey() == e.ENTER) {
Ext.ItemSearchText=this.getRawValue();#{dsInvStockingLocation}.load(); }"/>
<TriggerClick Handler="
Ext.ItemSearchText=this.getRawValue();#{dsInvStockingLocation}.load();
" />
<Select Handler= "LocationChangeHandler(#{cmbSourceLocation},#{cmbDestinationLocation},#{ItemStore},#{dsInventoryLocation});" />
</Listeners>
</nxtwc:NxtComboBox>
</Items>
</nxtwc:NxtPanel>
<nxtwc:NxtPanel runat="server" ID="PanelDate" Border="false" IDMode="Explicit" BodyStyle="background-color: #DFE8F6"
Padding="5">
<Items>
<nxtwc:NxtDateField ID="dfDueDate" runat="server" Width="220" EmptyText=" / / "
FieldLabel="DueDate" MinDate="<%# DateTime.Now %>" Editable="false" NxtRequired="true"
ValidationEvent="False" LabelAlign="Left" DataIndex="DueDate" ValidateOnBlur="false"
LabelWidth="130">
</nxtwc:NxtDateField>
</Items>
</nxtwc:NxtPanel>
</Items>
</ext:Container>
<ext:Container ID="CntrTransforReqHdr3" runat="server" LabelAlign="Left" Layout="FormLayout"
ColumnWidth="0.5" AutoDataBind="true">
<Items>
<nxtwc:NxtPanel runat="server" Layout="Column" ID="TransPanel2" Border="false" Height="5"
BodyStyle="background-color: #DFE8F6">
</nxtwc:NxtPanel>
<nxtwc:NxtPanel runat="server" ID="pnlTransNote" Border="false" BodyStyle="background-color: #DFE8F6"
IDMode="Explicit" AnchorHorizontal="100%" AnchorVertical="100%">
<Items>
<nxtwc:NxtTextArea ID="txtNote" runat="server" LabelAlign="Left" FieldLabel="Note"
DataIndex="Note" LabelWidth="100" Width="350">
</nxtwc:NxtTextArea>
</Items>
</nxtwc:NxtPanel>
</Items>
</ext:Container>
</Items>
</ext:Container>
<ext:Panel ID="plTransferCustomFlds" runat="server" PaddingSummary="5px 5px 0 10px"
Layout="FitLayout" Border="false" AnchorVertical="30%" AnchorHorizontal="100%"
BodyStyle="background-color: #DFE8F6" FormGroup="true" Title="Requisition Custom Fields" Collapsed="true">
<Items>
<nxtwc:NxtFormPanel ID="TransferReqCustomFldsContainer" runat="server" IDMode="Ignore" AutoScroll="true" Border="false" BodyBorder="false"
Padding="6" ForceLayout="true" Layout="FormLayout" HideLabels="false" AnchorVertical="100%" AnchorHorizontal="100%" AutoWidth="true"
BodyStyle="background-color: #DFE8F6" >
<Content>
<nxtwuc:CustomFieldsCtrl runat="server" ID="ReqHdrCustomFields" />
</Content>
</nxtwc:NxtFormPanel>
</Items>
<Listeners>
<Collapse Handler="CustomFields.SaveCustomFieldsDetails('undefined',{store:'',entityID:'',entityType:'TransferRequisitionHeader',container:#{TransferReqCustomFldsContainer}});" />
<Expand Handler="GenerateCustomFields(#{TransferReqCustomFldsContainer});" />
</Listeners>
</ext:Panel>
<ext:Container ID="CntrTransReqItemGrd" runat="server" LabelAlign="Left" Layout="FormLayout"
Height="50" AnchorHorizontal="100%">
<Items>
<nxtwc:NxtPanel runat="server" ID="pnlTransItems" Border="false" BodyStyle="background-color: #DFE8F6"
IDMode="Explicit" AnchorHorizontal="98%" Region="Center" PaddingSummary="5px 5px 0 5px"
FormGroup="true" Title="RequisitionLines">
<Content>
<nxtwuc:TransferItemGrid runat="server" ID="TransItems" />
</Content>
</nxtwc:NxtPanel>
</Items>
</ext:Container>
</Items>
<BottomBar>
<nxtwc:NxtToolbar runat="server" ID="tbSaveCancelTransReq" Visible="true">
<Content>
<nxtwuc:SaveCancelToolBar runat="server" ID="SaveCancelTransReq" SaveEventName="SaveTransferRequisition"
CancelEventName="CancelTransferRequisition" />
</Content>
</nxtwc:NxtToolbar>
</BottomBar>
<Listeners>
<AfterRender Handler="Ext.onReady(function () {
Ext.GLOBAL_STORE = parent.Ext.GLOBAL_STORE;
Ext.EventBroker = parent.Ext.EventBroker;
Ext.RESOURCE_STORE = parent.Ext.RESOURCE_STORE;
Ext.EventBroker.SubscribeEvent(document.title ,'SelectedLocationChanged',
{ StockingLocationStore: #{dsInventoryLocation}, SourceStockingLocationCombo: #{cmbSourceLocation},
DestinationStockingLocationCombo: #{cmbDestinationLocation}}, SelectedLocationChangedHandler);
Ext.EventBroker.SubscribeEvent(document.title ,'OnTransferRequisitionNew',
{ TransferReqForm: #{pnlTransferReq}, DestinationStockingLocationCombo: #{cmbDestinationLocation}, headerCustomFldsContainer:#{TransferReqCustomFldsContainer},
SourceStockingLocationCombo: #{cmbSourceLocation}, ControlStore: #{dsSaveTransferRequisition},
SourceStockingLocationStore: #{dsInvStockingLocation}, DestinationStockingLocationStore: #{dsInventoryLocation}, ItemRecordGridStore: #{ItemGridStore},
Note: #{txtNote}, SaveCancelToolBar: #{tbSaveCancelTransReq},
CustomFieldExpander: #{plTransferCustomFlds}}, NewTransferRequisition);
Ext.EventBroker.SubscribeEvent(document.title ,'OnTransferRequisitionView',
{ TransferReqForm: #{pnlTransferReq}, DestinationStockingLocationCombo: #{cmbDestinationLocation},headerCustomFldsContainer:#{TransferReqCustomFldsContainer},
SourceStockingLocationCombo: #{cmbSourceLocation}, ControlStore: #{dsSaveTransferRequisition},
SourceStockingLocationStore: #{dsInvStockingLocation}, DestinationStockingLocationStore: #{dsInventoryLocation},
ItemRecordGridStore: #{ItemGridStore}, Note: #{txtNote},
SaveCancelToolBar: #{tbSaveCancelTransReq}, CustomFieldExpander: #{plTransferCustomFlds} }
, ViewTransferRequisition);
Ext.EventBroker.SubscribeEvent(document.title ,
'OnTransferRequisitionEdit', { TransferReqForm: #{pnlTransferReq}, SourceStockingLocationCombo: #{cmbSourceLocation},headerCustomFldsContainer:#{TransferReqCustomFldsContainer},
DestinationStockingLocationCombo: #{cmbDestinationLocation}, ControlStore: #{dsSaveTransferRequisition},
SourceStockingLocationStore: #{dsInvStockingLocation}, DestinationStockingLocationStore: #{dsInventoryLocation},
ItemRecordGridStore: #{ItemGridStore}, Note: #{txtNote},DueDate:#{dfDueDate},
SaveCancelToolBar: #{tbSaveCancelTransReq}, CustomFieldExpander: #{plTransferCustomFlds} },
EditTransferRequisition);
Ext.EventBroker.SubscribeEvent(document.title ,'SaveTransferRequisition',
{ TransferReqForm: #{pnlTransferReq}, SourceStockingLocationCombo: #{cmbSourceLocation},
DestinationStockingLocationCombo: #{cmbDestinationLocation},
ControlStore: #{dsSaveTransferRequisition},
ItemRecordGridStore: #{ItemGridStore}, SaveCancelToolBar: #{tbSaveCancelTransReq}, CustomFieldExpander: #{plTransferCustomFlds} },
SaveEventHandler);
Ext.EventBroker.SubscribeEvent(document.title ,'CancelTransferRequisition',undefined, CancelEventHandler);
Ext.EventBroker.SubscribeEvent(document.title ,'TransferRequisitionsEditSelected',
{ ControlStore: #{dsSaveTransferRequisition},
Note: #{txtNote} }, Edit);
#{dsSaveTransferRequisition}.insertRecord(0);
if(Ext.GLOBAL_STORE.TransferRequisitionMode == 'New')
{
#{cmbSourceLocation}.setReadOnly(false);
#{cmbDestinationLocation}.setReadOnly(false);
#{dfDueDate}.setReadOnly(false);
NewTransferRequisition({ TransferReqForm: #{pnlTransferReq}, DestinationStockingLocationCombo: #{cmbDestinationLocation},headerCustomFldsContainer:#{TransferReqCustomFldsContainer}
,SourceStockingLocationCombo: #{cmbSourceLocation}, ControlStore: #{dsSaveTransferRequisition},
DestinationStockingLocationStore: #{dsInventoryLocation}, SourceStockingLocationStore: #{dsInvStockingLocation},
ItemRecordGridStore: #{ItemGridStore}, Note: #{txtNote},
SaveCancelToolBar: #{tbSaveCancelTransReq}, CustomFieldExpander: #{plTransferCustomFlds} },
{id: Ext.GLOBAL_STORE.SelectedTransferRequisitionID});
}
else if(Ext.GLOBAL_STORE.TransferRequisitionMode == 'View')
{
#{cmbSourceLocation}.setReadOnly(true);
#{cmbDestinationLocation}.setReadOnly(true);
#{dfDueDate}.setReadOnly(true);
ViewTransferRequisition({ TransferReqForm: #{pnlTransferReq}, DestinationStockingLocationCombo: #{cmbDestinationLocation},headerCustomFldsContainer:#{TransferReqCustomFldsContainer}
,SourceStockingLocationCombo: #{cmbSourceLocation}, ControlStore: #{dsSaveTransferRequisition},
DestinationStockingLocationStore: #{dsInventoryLocation}, SourceStockingLocationStore: #{dsInvStockingLocation},
ItemRecordGridStore: #{ItemGridStore}, Note: #{txtNote},
SaveCancelToolBar: #{tbSaveCancelTransReq},
CustomFieldExpander: #{plTransferCustomFlds} },
{id: Ext.GLOBAL_STORE.SelectedTransferRequisitionID});
}
else if(Ext.GLOBAL_STORE.TransferRequisitionMode == 'Edit' && #{hdnTransferRequisitionID}.value != undefined && #{hdnTransferRequisitionID}.value != '')
{
#{cmbSourceLocation}.setReadOnly(true);
#{cmbDestinationLocation}.setReadOnly(true);
EditTransferRequisition({ TransferReqForm: #{pnlTransferReq},
SourceStockingLocationCombo: #{cmbSourceLocation}, DestinationStockingLocationCombo: #{cmbDestinationLocation}, headerCustomFldsContainer:#{TransferReqCustomFldsContainer}
,ControlStore: #{dsSaveTransferRequisition}, SourceStockingLocationStore: #{dsInvStockingLocation},
DestinationStockingLocationStore: #{dsInventoryLocation}, ItemRecordGridStore: #{ItemGridStore},
Note: #{txtNote},DueDate:#{dfDueDate}, SaveCancelToolBar: #{tbSaveCancelTransReq},
CustomFieldExpander: #{plTransferCustomFlds} }, {id: #{hdnTransferRequisitionID}.value});
}});
Ext.EventBroker.SubscribeEvent(document.title ,'ViewOrderListSelected', undefined, ViewOrderListSelectedHandler);
Ext.EventBroker.SubscribeEvent(document.title ,'ViewPickListSelected', undefined, ViewPickListSelectedHandler);
Ext.EventBroker.SubscribeEvent(document.title ,'ViewPutAwayListSelected', undefined, ViewPutAwayListSelectedHandler);
Ext.EventBroker.SubscribeEvent(document.title ,'ApproveSelectedTransferReqs',{id: Ext.GLOBAL_STORE.SelectedTransferRequisitionID,lblTranReqStatus: #{lblTranReqStatus},lblTranReqNo: #{lblTranReqNo}}, ApproveTransferRequisitions);
Ext.EventBroker.SubscribeEvent(document.title ,'CancelSelectedTransferReqs',{id: Ext.GLOBAL_STORE.SelectedTransferRequisitionID,lblTranReqStatus: #{lblTranReqStatus},lblTranReqNo: #{lblTranReqNo}}, CancelTransferRequisitions);
Ext.EventBroker.SubscribeEvent(document.title ,'ExtraFieldStoreLoadedEvent',{HeaderFldSet:#{plTransferCustomFlds},EntityType:'TransferRequisitionHeader'}, Common.EnableCustomFields);
" />
</Listeners>
</ext:FormPanel>
</Items>
</ext:Viewport>
</body>
</html>