- ADMINISTRACIÓN - CAJA CHICA - CORTE DÍA - AGREGAR SELECTOR DE FECHA PARA DEFINIR LA FECHA CON LA QUE SE GUARDARA EL CORTE A CREAR
This commit is contained in:
parent
f8704c6e47
commit
12a7e80b6d
@ -873,7 +873,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
calendar.setTime(new Date());
|
calendar.setTime(getFechaCorte());
|
||||||
calendar.set(Calendar.HOUR_OF_DAY, 12);
|
calendar.set(Calendar.HOUR_OF_DAY, 12);
|
||||||
calendar.set(Calendar.MINUTE, 0);
|
calendar.set(Calendar.MINUTE, 0);
|
||||||
calendar.set(Calendar.SECOND, 0);
|
calendar.set(Calendar.SECOND, 0);
|
||||||
@ -903,7 +903,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
|||||||
closingSave.setOffice(new Office(getLoggedUser().getOffice().getId()));
|
closingSave.setOffice(new Office(getLoggedUser().getOffice().getId()));
|
||||||
closingSave.setUser(new User(userId));
|
closingSave.setUser(new User(userId));
|
||||||
closingSave.setCreatedBy(getLoggedUser().getId());
|
closingSave.setCreatedBy(getLoggedUser().getId());
|
||||||
closingSave.setCreatedOn(new Date());
|
closingSave.setCreatedOn(calendar.getTime());
|
||||||
closingSave.setComments(comments);
|
closingSave.setComments(comments);
|
||||||
closingSave.setRouteCtlg(userData.getHumanResource().getHumanResourceHasRoutes().get(0).getRouteCtlg());
|
closingSave.setRouteCtlg(userData.getHumanResource().getHumanResourceHasRoutes().get(0).getRouteCtlg());
|
||||||
if (closingDayCtrl.saveClosingDay(closingSave)) {
|
if (closingDayCtrl.saveClosingDay(closingSave)) {
|
||||||
@ -1188,6 +1188,14 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
|||||||
this.imprimirStatus = imprimirStatus;
|
this.imprimirStatus = imprimirStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getFechaCorte() {
|
||||||
|
return fechaCorte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaCorte(Date fechaCorte) {
|
||||||
|
this.fechaCorte = fechaCorte;
|
||||||
|
}
|
||||||
|
|
||||||
private ClosingDayController closingDayCtrl;
|
private ClosingDayController closingDayCtrl;
|
||||||
private GenericController genericCtrl;
|
private GenericController genericCtrl;
|
||||||
private BitacoraController bitacoraCtrl;
|
private BitacoraController bitacoraCtrl;
|
||||||
@ -1197,6 +1205,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
|||||||
private List<User> user;
|
private List<User> user;
|
||||||
|
|
||||||
private String userId;
|
private String userId;
|
||||||
|
private Date fechaCorte;
|
||||||
private String amount;
|
private String amount;
|
||||||
private String total;
|
private String total;
|
||||||
|
|
||||||
@ -1235,6 +1244,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
|||||||
|
|
||||||
//initOneWeekBeforeToCurrdate();
|
//initOneWeekBeforeToCurrdate();
|
||||||
initThisWeekToCurrdate();
|
initThisWeekToCurrdate();
|
||||||
|
setFechaCorte(new Date());
|
||||||
|
|
||||||
imprimirStatus = true;
|
imprimirStatus = true;
|
||||||
closingDay = fillDatatableClosingDay();
|
closingDay = fillDatatableClosingDay();
|
||||||
|
|||||||
@ -24,11 +24,11 @@
|
|||||||
<div class="ui-g-8">
|
<div class="ui-g-8">
|
||||||
<div class="card card-w-title">
|
<div class="card card-w-title">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.yellow2Row {
|
.yellow2Row {
|
||||||
background-color: #ffff00 !important;
|
background-color: #ffff00 !important;
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
color: #000000 !important;
|
color: #000000 !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h4>#{permission['admin.closingDay.add']}</h4>
|
<h4>#{permission['admin.closingDay.add']}</h4>
|
||||||
@ -47,6 +47,19 @@
|
|||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
</p:panelGrid>
|
</p:panelGrid>
|
||||||
<p:panelGrid columns="1" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
<p:panelGrid columns="1" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||||
|
|
||||||
|
<h:panelGroup id="startDateSearchHistorical" styleClass="md-inputfield">
|
||||||
|
<p:calendar showOn="button"
|
||||||
|
id="startDateSearchCalendar"
|
||||||
|
style="text-transform: capitalize;"
|
||||||
|
readonlyInput="true"
|
||||||
|
value="#{closingDayManager.fechaCorte}"
|
||||||
|
locale="es"
|
||||||
|
navigator="true"
|
||||||
|
pattern="#{i18n['pattern.date']}"/>
|
||||||
|
<label>Fecha con la que guardará el corte</label>
|
||||||
|
</h:panelGroup>
|
||||||
|
|
||||||
<h:panelGroup styleClass="md-inputfield">
|
<h:panelGroup styleClass="md-inputfield">
|
||||||
<p:commandButton value="#{i18n['general.search']}"
|
<p:commandButton value="#{i18n['general.search']}"
|
||||||
update="user ctxMenuItem2 dtResumen totalCustomerWithOutAction totalDepositByUser dtPaymentZero totalAmountPayment transferSender transferReceiver comentarios otherExpense moneyDaily delivery transferPending totales messages"
|
update="user ctxMenuItem2 dtResumen totalCustomerWithOutAction totalDepositByUser dtPaymentZero totalAmountPayment transferSender transferReceiver comentarios otherExpense moneyDaily delivery transferPending totales messages"
|
||||||
@ -69,7 +82,7 @@
|
|||||||
</p:panelGrid>
|
</p:panelGrid>
|
||||||
<p:panelGrid columns="1" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
<p:panelGrid columns="1" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||||
<h:panelGroup styleClass="md-inputfield">
|
<h:panelGroup styleClass="md-inputfield">
|
||||||
|
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
</p:panelGrid>
|
</p:panelGrid>
|
||||||
<div style="text-align: center;"><h3>Totales</h3></div>
|
<div style="text-align: center;"><h3>Totales</h3></div>
|
||||||
@ -195,50 +208,50 @@
|
|||||||
</p:commandButton>
|
</p:commandButton>
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
</p:panelGrid>
|
</p:panelGrid>
|
||||||
|
|
||||||
<br></br><br></br>
|
<br></br><br></br>
|
||||||
|
|
||||||
<h2>Detalle del corte</h2>
|
<h2>Detalle del corte</h2>
|
||||||
<p:dataTable widgetVar="dtResumen" id="dtResumen" var="closingDetail" draggableRows="true" draggableColumns="true" value="#{closingDayManager.closingDetail}" style="margin-bottom:20px" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="No hay registros por mostrar"
|
<p:dataTable widgetVar="dtResumen" id="dtResumen" var="closingDetail" draggableRows="true" draggableColumns="true" value="#{closingDayManager.closingDetail}" style="margin-bottom:20px" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="No hay registros por mostrar"
|
||||||
rowKey="#{closingDetail.id}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
rowKey="#{closingDetail.id}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||||
|
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<div style="float:right;padding-top: 5px;padding-left: 5px;padding-right: 5px">
|
<div style="float:right;padding-top: 5px;padding-left: 5px;padding-right: 5px">
|
||||||
<h:commandLink title="Exportar a Excel">
|
<h:commandLink title="Exportar a Excel">
|
||||||
<p:graphicImage name="images/excel-xls-icon.png" library="serenity-layout" width="48"/>
|
<p:graphicImage name="images/excel-xls-icon.png" library="serenity-layout" width="48"/>
|
||||||
<p:dataExporter type="xls" target="dtResumen" fileName="DetalleCorte" />
|
<p:dataExporter type="xls" target="dtResumen" fileName="DetalleCorte" />
|
||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</div>
|
</div>
|
||||||
<p:outputPanel>
|
<p:outputPanel>
|
||||||
<h:outputText value="#{i18n['general.search']}: " />
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
<p:inputText id="globalFilter" onkeyup="PF('dtResumen').filter()" style="width:150px;color: #000000;"/>
|
<p:inputText id="globalFilter" onkeyup="PF('dtResumen').filter()" style="width:150px;color: #000000;"/>
|
||||||
</p:outputPanel>
|
</p:outputPanel>
|
||||||
</f:facet>
|
</f:facet>
|
||||||
|
|
||||||
<p:column headerText="Detalle" sortBy="#{closingDetail.comments}" filterBy="#{closingDetail.comments}">
|
<p:column headerText="Detalle" sortBy="#{closingDetail.comments}" filterBy="#{closingDetail.comments}">
|
||||||
<h:outputText value="#{closingDetail.comments}" />
|
<h:outputText value="#{closingDetail.comments}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Monto" sortBy="#{closingDetail.amount}" filterBy="#{closingDetail.amount}">
|
<p:column headerText="Monto" sortBy="#{closingDetail.amount}" filterBy="#{closingDetail.amount}">
|
||||||
<h:outputText value="#{closingDetail.amount}">
|
<h:outputText value="#{closingDetail.amount}">
|
||||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Saldo insoluto" sortBy="#{closingDetail.saldo}" filterBy="#{closingDetail.saldo}">
|
<p:column headerText="Saldo insoluto" sortBy="#{closingDetail.saldo}" filterBy="#{closingDetail.saldo}">
|
||||||
<h:outputText value="#{closingDetail.saldo}">
|
<h:outputText value="#{closingDetail.saldo}">
|
||||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Tipo" sortBy="#{closingDetail.type}" filterBy="#{closingDetail.type}">
|
<p:column headerText="Tipo" sortBy="#{closingDetail.type}" filterBy="#{closingDetail.type}">
|
||||||
<h:outputText value="#{closingDetail.type}">
|
<h:outputText value="#{closingDetail.type}">
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Fecha" sortBy="#{closingDetail.createdOn}" filterBy="#{closingDetail.createdOn}">
|
<p:column headerText="Fecha" sortBy="#{closingDetail.createdOn}" filterBy="#{closingDetail.createdOn}">
|
||||||
<h:outputText value="#{closingDetail.createdOn}">
|
<h:outputText value="#{closingDetail.createdOn}">
|
||||||
<f:convertDateTime type="date" locale="es" timeZone="GMT-6" pattern="dd - MMMM - yyyy hh:mm:ss"/>
|
<f:convertDateTime type="date" locale="es" timeZone="GMT-6" pattern="dd - MMMM - yyyy hh:mm:ss"/>
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
</p:dataTable>
|
</p:dataTable>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -249,21 +262,21 @@
|
|||||||
<p:dataTable widgetVar="dtPaymentZero" id="dtPaymentZero" var="paymentoZeroDetail" draggableRows="true" draggableColumns="true" value="#{closingDayManager.paymentoZeroDetail}" style="margin-bottom:20px" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="No hay registros por mostrar"
|
<p:dataTable widgetVar="dtPaymentZero" id="dtPaymentZero" var="paymentoZeroDetail" draggableRows="true" draggableColumns="true" value="#{closingDayManager.paymentoZeroDetail}" style="margin-bottom:20px" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="No hay registros por mostrar"
|
||||||
rowKey="#{paymentoZeroDetail.id}" rowStyleClass="yellow2Row" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
rowKey="#{paymentoZeroDetail.id}" rowStyleClass="yellow2Row" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||||
|
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<p:outputPanel>
|
<p:outputPanel>
|
||||||
<h:outputText value="#{i18n['general.search']}: " />
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
<p:inputText id="globalFilter" onkeyup="PF('dtResumen').filter()" style="width:150px;color: #000000;"/>
|
<p:inputText id="globalFilter" onkeyup="PF('dtResumen').filter()" style="width:150px;color: #000000;"/>
|
||||||
</p:outputPanel>
|
</p:outputPanel>
|
||||||
</f:facet>
|
</f:facet>
|
||||||
|
|
||||||
<p:column headerText="Cliente" sortBy="#{paymentoZeroDetail.customer.fullName}" filterBy="#{paymentoZeroDetail.customer.fullName}">
|
<p:column headerText="Cliente" sortBy="#{paymentoZeroDetail.customer.fullName}" filterBy="#{paymentoZeroDetail.customer.fullName}">
|
||||||
<h:outputText value="#{paymentoZeroDetail.customer.fullName}" />
|
<h:outputText value="#{paymentoZeroDetail.customer.fullName}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Comentarios" sortBy="#{paymentoZeroDetail.comments}" filterBy="#{paymentoZeroDetail.comments}">
|
<p:column headerText="Comentarios" sortBy="#{paymentoZeroDetail.comments}" filterBy="#{paymentoZeroDetail.comments}">
|
||||||
<h:outputText value="#{paymentoZeroDetail.comments}">
|
<h:outputText value="#{paymentoZeroDetail.comments}">
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
</p:dataTable>
|
</p:dataTable>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-4">
|
<div class="ui-g-4">
|
||||||
@ -363,7 +376,7 @@
|
|||||||
</p:panelGrid>
|
</p:panelGrid>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</h:form>
|
</h:form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user