- 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;
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
calendar.setTime(getFechaCorte());
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 12);
|
||||
calendar.set(Calendar.MINUTE, 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.setUser(new User(userId));
|
||||
closingSave.setCreatedBy(getLoggedUser().getId());
|
||||
closingSave.setCreatedOn(new Date());
|
||||
closingSave.setCreatedOn(calendar.getTime());
|
||||
closingSave.setComments(comments);
|
||||
closingSave.setRouteCtlg(userData.getHumanResource().getHumanResourceHasRoutes().get(0).getRouteCtlg());
|
||||
if (closingDayCtrl.saveClosingDay(closingSave)) {
|
||||
@ -1188,6 +1188,14 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
this.imprimirStatus = imprimirStatus;
|
||||
}
|
||||
|
||||
public Date getFechaCorte() {
|
||||
return fechaCorte;
|
||||
}
|
||||
|
||||
public void setFechaCorte(Date fechaCorte) {
|
||||
this.fechaCorte = fechaCorte;
|
||||
}
|
||||
|
||||
private ClosingDayController closingDayCtrl;
|
||||
private GenericController genericCtrl;
|
||||
private BitacoraController bitacoraCtrl;
|
||||
@ -1197,6 +1205,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
private List<User> user;
|
||||
|
||||
private String userId;
|
||||
private Date fechaCorte;
|
||||
private String amount;
|
||||
private String total;
|
||||
|
||||
@ -1235,6 +1244,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
|
||||
//initOneWeekBeforeToCurrdate();
|
||||
initThisWeekToCurrdate();
|
||||
setFechaCorte(new Date());
|
||||
|
||||
imprimirStatus = true;
|
||||
closingDay = fillDatatableClosingDay();
|
||||
|
||||
@ -24,11 +24,11 @@
|
||||
<div class="ui-g-8">
|
||||
<div class="card card-w-title">
|
||||
<style type="text/css">
|
||||
.yellow2Row {
|
||||
background-color: #ffff00 !important;
|
||||
background-image: none !important;
|
||||
color: #000000 !important;
|
||||
}
|
||||
.yellow2Row {
|
||||
background-color: #ffff00 !important;
|
||||
background-image: none !important;
|
||||
color: #000000 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h4>#{permission['admin.closingDay.add']}</h4>
|
||||
@ -47,6 +47,19 @@
|
||||
</h:panelGroup>
|
||||
</p:panelGrid>
|
||||
<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">
|
||||
<p:commandButton value="#{i18n['general.search']}"
|
||||
update="user ctxMenuItem2 dtResumen totalCustomerWithOutAction totalDepositByUser dtPaymentZero totalAmountPayment transferSender transferReceiver comentarios otherExpense moneyDaily delivery transferPending totales messages"
|
||||
@ -200,44 +213,44 @@
|
||||
|
||||
<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"
|
||||
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">
|
||||
<div style="float:right;padding-top: 5px;padding-left: 5px;padding-right: 5px">
|
||||
<h:commandLink title="Exportar a Excel">
|
||||
<p:graphicImage name="images/excel-xls-icon.png" library="serenity-layout" width="48"/>
|
||||
<p:dataExporter type="xls" target="dtResumen" fileName="DetalleCorte" />
|
||||
</h:commandLink>
|
||||
</div>
|
||||
<p:outputPanel>
|
||||
<h:outputText value="#{i18n['general.search']}: " />
|
||||
<p:inputText id="globalFilter" onkeyup="PF('dtResumen').filter()" style="width:150px;color: #000000;"/>
|
||||
</p:outputPanel>
|
||||
</f:facet>
|
||||
<f:facet name="header">
|
||||
<div style="float:right;padding-top: 5px;padding-left: 5px;padding-right: 5px">
|
||||
<h:commandLink title="Exportar a Excel">
|
||||
<p:graphicImage name="images/excel-xls-icon.png" library="serenity-layout" width="48"/>
|
||||
<p:dataExporter type="xls" target="dtResumen" fileName="DetalleCorte" />
|
||||
</h:commandLink>
|
||||
</div>
|
||||
<p:outputPanel>
|
||||
<h:outputText value="#{i18n['general.search']}: " />
|
||||
<p:inputText id="globalFilter" onkeyup="PF('dtResumen').filter()" style="width:150px;color: #000000;"/>
|
||||
</p:outputPanel>
|
||||
</f:facet>
|
||||
|
||||
<p:column headerText="Detalle" sortBy="#{closingDetail.comments}" filterBy="#{closingDetail.comments}">
|
||||
<h:outputText value="#{closingDetail.comments}" />
|
||||
</p:column>
|
||||
<h:outputText value="#{closingDetail.comments}" />
|
||||
</p:column>
|
||||
<p:column headerText="Monto" sortBy="#{closingDetail.amount}" filterBy="#{closingDetail.amount}">
|
||||
<h:outputText value="#{closingDetail.amount}">
|
||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
<h:outputText value="#{closingDetail.amount}">
|
||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
<p:column headerText="Saldo insoluto" sortBy="#{closingDetail.saldo}" filterBy="#{closingDetail.saldo}">
|
||||
<h:outputText value="#{closingDetail.saldo}">
|
||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
<h:outputText value="#{closingDetail.saldo}">
|
||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
<p:column headerText="Tipo" sortBy="#{closingDetail.type}" filterBy="#{closingDetail.type}">
|
||||
<h:outputText value="#{closingDetail.type}">
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
<h:outputText value="#{closingDetail.type}">
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
<p:column headerText="Fecha" sortBy="#{closingDetail.createdOn}" filterBy="#{closingDetail.createdOn}">
|
||||
<h:outputText value="#{closingDetail.createdOn}">
|
||||
<f:convertDateTime type="date" locale="es" timeZone="GMT-6" pattern="dd - MMMM - yyyy hh:mm:ss"/>
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
<h:outputText value="#{closingDetail.createdOn}">
|
||||
<f:convertDateTime type="date" locale="es" timeZone="GMT-6" pattern="dd - MMMM - yyyy hh:mm:ss"/>
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
|
||||
|
||||
</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"
|
||||
rowKey="#{paymentoZeroDetail.id}" rowStyleClass="yellow2Row" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||
|
||||
<f:facet name="header">
|
||||
<p:outputPanel>
|
||||
<h:outputText value="#{i18n['general.search']}: " />
|
||||
<p:inputText id="globalFilter" onkeyup="PF('dtResumen').filter()" style="width:150px;color: #000000;"/>
|
||||
</p:outputPanel>
|
||||
</f:facet>
|
||||
<f:facet name="header">
|
||||
<p:outputPanel>
|
||||
<h:outputText value="#{i18n['general.search']}: " />
|
||||
<p:inputText id="globalFilter" onkeyup="PF('dtResumen').filter()" style="width:150px;color: #000000;"/>
|
||||
</p:outputPanel>
|
||||
</f:facet>
|
||||
|
||||
<p:column headerText="Cliente" sortBy="#{paymentoZeroDetail.customer.fullName}" filterBy="#{paymentoZeroDetail.customer.fullName}">
|
||||
<h:outputText value="#{paymentoZeroDetail.customer.fullName}" />
|
||||
</p:column>
|
||||
<h:outputText value="#{paymentoZeroDetail.customer.fullName}" />
|
||||
</p:column>
|
||||
<p:column headerText="Comentarios" sortBy="#{paymentoZeroDetail.comments}" filterBy="#{paymentoZeroDetail.comments}">
|
||||
<h:outputText value="#{paymentoZeroDetail.comments}">
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-g-4">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user