From 12a7e80b6d47987d89aabeaf4ad6adc8fc72e142 Mon Sep 17 00:00:00 2001 From: "Brayan.Gonzalez" Date: Wed, 3 Sep 2025 18:22:21 -0600 Subject: [PATCH] =?UTF-8?q?=20-=20ADMINISTRACI=C3=93N=20-=20CAJA=20CHICA?= =?UTF-8?q?=20-=20CORTE=20D=C3=8DA=20-=20AGREGAR=20SELECTOR=20DE=20FECHA?= =?UTF-8?q?=20PARA=20DEFINIR=20LA=20FECHA=20CON=20LA=20QUE=20SE=20GUARDARA?= =?UTF-8?q?=20EL=20CORTE=20A=20CREAR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apc/web/beans/admin/ClosingDayBean.java | 14 ++- .../webapp/app/admin/closingDay/index.xhtml | 117 ++++++++++-------- 2 files changed, 77 insertions(+), 54 deletions(-) diff --git a/apc-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java b/apc-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java index 668cf6b..57e7ea7 100644 --- a/apc-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java +++ b/apc-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java @@ -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; 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(); diff --git a/apc-web/src/main/webapp/app/admin/closingDay/index.xhtml b/apc-web/src/main/webapp/app/admin/closingDay/index.xhtml index d9fed8f..52ab2bc 100644 --- a/apc-web/src/main/webapp/app/admin/closingDay/index.xhtml +++ b/apc-web/src/main/webapp/app/admin/closingDay/index.xhtml @@ -24,11 +24,11 @@

#{permission['admin.closingDay.add']}

@@ -47,6 +47,19 @@ + + + + + + - +

Totales

@@ -195,50 +208,50 @@
- +



- +

Detalle del corte

+ rowKey="#{closingDetail.id}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"> - -
- - - - -
- - - - -
+ +
+ + + + +
+ + + + +
- - + + - - - - + + + + - - - - + + + + - - - + + + - - - - -
- + + + + + +
@@ -249,21 +262,21 @@ - - - - - - + + + + + + - - + + - - - + + +
@@ -363,7 +376,7 @@
- +