Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"
- xmlns:j="http://jleaf.org/faces" xmlns:jl="http://java.sun.com/jsf/composite/jlcomponents"
- xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:autonum="http://java.sun.com/jsf/composite/autonum">
- <ui:composition template="/WEB-INF/layouts/base.xhtml">
- <ui:define name="headPart">
- <j:lang id="lang" prefix="org.jleaf.erp.sls.web" />
- <title>#{piece['pos']}</title>
- <j:authorize task="reportSalesSummary">
- <script>
- $(document).ready(function() {
- doSelectOu();
- });
- </script>
- </j:authorize>
- <link href="${request.contextPath}/jleaf.resource/org/jleaf/erp/fin/web/resources/css/style.css" type="text/css"
- rel="stylesheet" />
- <title>#{piece['pos']}</title>
- </ui:define>
- <ui:define name="contentPart">
- <input type="hidden" value="#{pointOfSalesController}" />
- <div class="page_title">
- <span>#{piece['pos']}</span>
- </div>
- <p:panel>
- <p:remoteCommand name="doSelectOu"
- process=":rootform:comboOu"
- actionListener="#{createDkbExternalController.onOuChanged}"
- update="@this,:rootform:comboEvent:comboEvent " />
- <j:authorize task="reportSalesSummary" forbidden="true">
- <p:messages id="messages" />
- <h:panelGrid id="panelSearch">
- <h:panelGrid columns="3">
- <h:outputText value="#{piece['ouBuOrBranch']}" />
- <h:outputText value="#{piece['eventCodeName']}" />
- <h:outputText value="#{piece['docNo']}" />
- <jl:comboBox id="comboOu" value="#{filterBean.data['ou']}"
- taskName="system" comboName="authorizedOUMainBuOrBranch" args=",,Y"
- itemLabel="#{item['code']} / #{item['name']}"
- ajax="true"
- update=":rootform:comboEvent:comboEvent"
- listener="#{createSalesOrderController.ouChanged}" />
- <jl:autoComplete id="comboEvent"
- task="system"
- value="#{filterBean.data['event']}"
- comboName="getAuthorizedEventListByOu"
- args="#{filterBean.data['ou']['id']},,"
- itemLabel="#{empty item ?'' : item.code.concat(' - ').concat(item.name)}"
- label="code,name" styleClass="md" />
- <p:inputText value="#{filterBean.data['docNo']}" styleClass="md" />
- </h:panelGrid>
- <h:panelGrid columns="4">
- <h:outputText value="#{piece['productCodeNameCorrection']}" />
- <h:outputText value="#{piece['productCodeNameOriginal']}" />
- <h:outputText value="#{piece['productCodeInvalid']}" />
- <h:outputText value="#{piece['flgCorrection']}" />
- <p:inputText value="#{filterBean.data['productCodeNameCorrection']}" styleClass="md" />
- <p:inputText value="#{filterBean.data['productCodeNameOriginal']}" styleClass="md" />
- <p:selectOneButton id="productInvalid" value="#{filterBean.data['productInvalid']}">
- <f:selectItem itemLabel="#{piece['all']}" itemValue="" />
- <f:selectItem itemLabel="#{piece['invalidProductCode']}" itemValue="Y" />
- <f:selectItem itemLabel="#{piece['validProductCode']}" itemValue="N" />
- </p:selectOneButton>
- <p:selectOneButton id="flgCorrection" value="#{filterBean.data['flgCorrection']}">
- <f:selectItem itemLabel="#{piece['all']}" itemValue="" />
- <f:selectItem itemLabel="#{piece['yes']}" itemValue="Y" />
- <f:selectItem itemLabel="#{piece['no']}" itemValue="N" />
- </p:selectOneButton>
- </h:panelGrid>
- <p:commandButton id="btnSearch"
- icon="ui-icon ui-icon-search"
- actionListener="#{pointOfSalesController.doSearch()}"
- value="#{piece['search']}" update="grid messages" process="panelSearch,@this" />
- <p:defaultCommand target="btnSearch" />
- </h:panelGrid>
- </j:authorize>
- <p:dataTable id="grid"
- value="#{pointOfSalesController.salesPosItemList}" var="item"
- paginator="true" rows="25" lazy="true"
- paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
- rowsPerPageTemplate="25,50,100"
- rowKey="#{item['id']}">
- <p:column headerText="#{piece['action']}">
- <p:commandLink value="#{piece['edit']}"
- actionListener="#{pointOfSalesController.prepareCorrectionItem(item)}"
- update=":formEditCorrection"
- oncomplete="editCorrection.show()" />
- <p:spacer width="2" />
- <p:commandLink value="#{piece['remove']}"/>
- </p:column>
- <p:column headerText="#{piece['event']}">
- <h:outputText value="#{item['eventCode']} - #{item['eventName']}" />
- </p:column>
- <p:column headerText="#{piece['docNo']}">
- <h:outputText value="#{item['docNo']}" />
- </p:column>
- <p:column headerText="#{piece['docDate']}">
- <h:outputText value="#{item['docDate']}" converter="#{dateConverter}" />
- </p:column>
- <p:column headerText="#{piece['product']}">
- <h:outputText value="#{item['productCodeCorrection']}-#{item['productNameCorrection']}" />
- </p:column>
- <p:column headerText="#{piece['qtyOriginal']}">
- <h:outputText value="#{item['qtyOriginal']}-#{item['uomCode']}" />
- </p:column>
- <p:column headerText="#{piece['qtyCorrection']}">
- <h:outputText value="#{item['qtyCorrection']}-#{item['uomCode']}" />
- </p:column>
- <p:column headerText="#{piece['priceUnitOriginal']}">
- <h:outputText value="#{item['pricePerUnitOriginal']}" converter="#{numericConverter}" />
- </p:column>
- <p:column headerText="#{piece['priceUnitCorrection']}">
- <h:outputText value="#{item['pricePerUnitCorrection']}" converter="#{numericConverter}" />
- </p:column>
- <p:column headerText="#{piece['discOriginal']}">
- <h:outputText value="#{item['potOriginal']}" converter="#{numericConverter}" />
- </p:column>
- <p:column headerText="#{piece['discCorrection']}">
- <h:outputText value="#{item['potCorrection']}" converter="#{numericConverter}" />
- </p:column>
- <p:column headerText="#{piece['subTotalOriginal']}">
- <h:outputText value="#{item['subTotalOriginal']}" converter="#{numericConverter}" />
- </p:column>
- <p:column headerText="#{piece['subTotalCorrection']}">
- <h:outputText value="#{item['subTotalCorrection']}" converter="#{numericConverter}" />
- </p:column>
- <p:column headerText="#{piece['flgCorrection']}">
- <h:outputText value="#{item['flgCorrection'] == 'Y' ? 'Yes' : 'No'}" />
- </p:column>
- </p:dataTable>
- </p:panel>
- </ui:define>
- <ui:define name="outsidePart">
- <h:form id="formEditCorrection">
- <p:dialog widgetVar="editCorrection" header="#{piece['editCorrection']}" height="420" width="590"
- severity="alert">
- <p:messages id="messages" autoUpdate="true" />
- <h:panelGrid id="panelCorrection">
- <h:panelGrid columns="2">
- <h:outputText value="#{piece['eventCode']}" />
- <h:outputText value="#{piece['eventName']}" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['eventCode']}" disabled="true" styleClass="md" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['eventName']}" disabled="true" styleClass="md" />
- </h:panelGrid>
- <h:panelGrid columns="2">
- <h:outputText value="#{piece['docNo']}" />
- <h:outputText value="#{piece['docDate']}" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['docNo']}" disabled="true" styleClass="md" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['docDate']}" converter="#{dateConverter}" disabled="true" styleClass="md" />
- </h:panelGrid>
- <h:panelGrid columns="2">
- <h:outputText value="#{piece['productCodeOriginal']}" />
- <h:outputText value="#{piece['productNameOriginal']}" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['productCode']}" disabled="true" styleClass="md" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['productName']}" disabled="true" styleClass="md" />
- </h:panelGrid>
- <h:panelGrid columns="3">
- <h:outputText value="#{piece['productCodeCorrection']}" />
- <h:outputText value="#{piece['productNameCorrection']}" />
- <h:outputText/>
- <p:inputText id="productCodeCorrection" value="#{pointOfSalesController.itemCorrection['productCodeCorrection']}" disabled="true" styleClass="md" />
- <p:inputText id="productNameCorrection" value="#{pointOfSalesController.itemCorrection['productNameCorrection']}" disabled="true" styleClass="md" />
- <p:commandLink onclick="lookup.show()">
- <h:graphicImage library="images" name="common/view.png" />
- </p:commandLink>
- </h:panelGrid>
- <h:panelGrid columns="2">
- <h:outputText value="#{piece['qtyOriginal']}" />
- <h:outputText value="#{piece['qtyCorrection']}" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['qtyOriginal']}" disabled="true" styleClass="md" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['qtyCorrection']}" styleClass="md" />
- </h:panelGrid>
- <h:panelGrid columns="2">
- <h:outputText value="#{piece['priceUnitOriginal']}" />
- <h:outputText value="#{piece['priceUnitCorrection']}" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['pricePerUnitOriginal']}" converter="#{numericConverter}" disabled="true" styleClass="md" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['pricePerUnitCorrection']}" converter="#{numericConverter}" styleClass="md" />
- </h:panelGrid>
- <h:panelGrid columns="2">
- <h:outputText value="#{piece['discOriginal']}" />
- <h:outputText value="#{piece['discCorrection']}" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['potOriginal']}" converter="#{numericConverter}" disabled="true" styleClass="md" />
- <p:inputText value="#{pointOfSalesController.itemCorrection['potCorrection']}" converter="#{numericConverter}" styleClass="md" />
- </h:panelGrid>
- </h:panelGrid>
- <p:commandButton value="#{piece['save']}"
- actionListener="#{pointOfSalesController.doCorrectionItem()}"
- update="panelCorrection :rootform:grid"
- oncomplete="console.log(args),args.success == false ? editCorrection.show() : editCorrection.hide()" icon="ui-icon-disk" />
- <p:commandButton value="#{piece['close']}" type="button"
- onclick="editCorrection.hide()"
- icon="ui-icon-circle-close" />
- </p:dialog>
- </h:form>
- <p:dialog widgetVar="lookup" id="lookup_product" modal="true"
- header="Lookup Product" width="800" height="500">
- <p:messages id="messages" autoUpdate="true" />
- <h:form>
- <p:panel>
- <h:panelGrid columns="2">
- <h:outputText value="#{piece['categoryProduct']}" />
- <p:selectOneMenu id="ctgrProductCmb"
- value="#{lookupInfoProductNonAssembly.ctgrProductId}">
- <p:ajax
- listener="#{lookupInfoProductNonAssembly.loadSubCtgrProductListByCtgrProduct()}"
- update="subCtgrProductCmb" />
- <f:selectItem itemValue="-99" itemLabel="#{piece['all']}" />
- <f:selectItems
- value="#{lookupInfoProductNonAssembly.ctgrProductList}"
- var="ctgrProductItem"
- itemLabel="#{ctgrProductItem['code'].concat(' - ').concat(ctgrProductItem['name'])}"
- itemValue="#{ctgrProductItem['id']}" />
- </p:selectOneMenu>
- <h:outputText value="#{piece['subCategoryProduct']}" />
- <p:selectOneMenu id="subCtgrProductCmb" styleClass="md"
- value="#{lookupInfoProductNonAssembly.subCtgrProductId}">
- <f:selectItem itemValue="-99" itemLabel="#{piece['all']}" />
- <f:selectItems
- value="#{lookupInfoProductNonAssembly.subCtgrProductList}"
- var="subCtgrProductItem"
- itemLabel="#{subCtgrProductItem['code'].concat(' - ').concat(subCtgrProductItem['name'])}"
- itemValue="#{subCtgrProductItem['id']}" />
- </p:selectOneMenu>
- <h:outputText value="#{piece['brand']}" />
- <p:selectOneMenu id="brandCmb"
- value="#{lookupInfoProductNonAssembly.brandId}">
- <f:selectItem itemValue="-99" itemLabel="#{piece['all']}" />
- <f:selectItems value="#{lookupInfoProductNonAssembly.brandList}"
- var="brandItem"
- itemLabel="#{brandItem['code']} - #{brandItem['name']}"
- itemValue="#{brandItem['id']}" />
- </p:selectOneMenu>
- <h:outputText value="#{piece['productCode']}" />
- <p:inputText id="productCodeTxt"
- value="#{lookupInfoProductNonAssembly.productCode}" />
- <h:outputText value="#{piece['productName']}" />
- <p:inputText id="productNameTxt"
- value="#{lookupInfoProductNonAssembly.productName}" />
- <h:outputText />
- <p:commandButton id="searchButton" value="#{piece['search']}"
- actionListener="#{lookupInfoProductNonAssembly.doSearch()}"
- update="lookupGrid" />
- </h:panelGrid>
- </p:panel>
- <p:defaultCommand target="searchButton" />
- <p:dataTable id="lookupGrid" paginator="true"
- value="#{lookupInfoProductNonAssembly.model}" lazy="true"
- var="lookupItem" rows="20" rowsPerPageTemplate="10,25,50,100,150,200"
- paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" >
- <p:column>
- <p:commandLink value="Select"
- actionListener="#{pointOfSalesController.selectLookupItem(lookupItem)}"
- update=":formEditCorrection:productCodeCorrection :formEditCorrection:productNameCorrection"
- oncomplete="lookup.hide()"/>
- </p:column>
- <p:column headerText="#{piece['productCode']}"
- sortBy="#{lookupItem.code}">
- <h:outputText value="#{lookupItem['code']}" />
- </p:column>
- <p:column headerText="#{piece['productName']}"
- sortBy="#{lookupItem.name}">
- <h:outputText value="#{lookupItem['name']}" />
- </p:column>
- <p:column headerText="#{piece['categoryProduct']}">
- <h:outputText value="#{lookupItem['ctgrProductName']}" />
- </p:column>
- <p:column headerText="#{piece['subCategoryProduct']}">
- <h:outputText value="#{lookupItem['subCtgrProductName']}" />
- </p:column>
- </p:dataTable>
- </h:form>
- </p:dialog>
- </ui:define>
- </ui:composition>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment