Datumseingabe Fälligkeit
This commit is contained in:
parent
6fd29f5612
commit
1e4382e94f
6 changed files with 6828 additions and 17 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
|
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
|
||||||
<jta-data-source>${imixs-office.jta-data-source}</jta-data-source>
|
<jta-data-source>${imixs-office.jta-data-source}</jta-data-source>
|
||||||
<jar-file>lib/imixs-workflow-engine-${org.imixs.workflow.version}.jar</jar-file>
|
<jar-file>lib/imixs-workflow-engine-${org.imixs.workflow.version}.jar</jar-file>
|
||||||
<jar-file>lib/imixs-marty-ejb-${org.imixs.marty.version}.jar</jar-file>
|
<jar-file>lib/imixs-marty-${org.imixs.marty.version}.jar</jar-file>
|
||||||
<properties>
|
<properties>
|
||||||
<!-- target-database Auto MySQL PostgreSQL -->
|
<!-- target-database Auto MySQL PostgreSQL -->
|
||||||
<property name="eclipselink.target-database" value="Auto" />
|
<property name="eclipselink.target-database" value="Auto" />
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,106 @@
|
||||||
// custom scripts
|
// custom scripts
|
||||||
|
// Zusatzfunktionen zur schnelleren Datumseingabe
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hier fuellen wir die Buchungsperiode falls nichts eingetragen
|
|
||||||
* - Change 9.2.2021 - keine Vorbefuellung mehr!
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// check data-item invoice-date and invoice-period....
|
/*
|
||||||
/* - disabled 9.2.2021
|
* Hier berechnen wir anhand der Eingabe im Feld alexander-logistic-date-days
|
||||||
date = $("input[data-item='invoice.date']");
|
* ein neues Datum auf basis des Rechnungsdatum (date_invoice)
|
||||||
period=$("input[data-item='invoice.period']");
|
*/
|
||||||
if (period && date) {
|
$(".alexander-logistic-date-days").change(function(e) {
|
||||||
if (date.val()!="" && period.val()=="") {
|
var days = $(this).val();
|
||||||
// no data - so build the period from 05.12.2020
|
if (days=='') {
|
||||||
part1=date.val().substring(6,10);
|
return true;
|
||||||
part2=date.val().substring(3,5);
|
|
||||||
newval=""+part1 +part2;
|
|
||||||
$("input[data-item='invoice.period']").val(newval);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
*/
|
// find the basis date 'date_invoice'
|
||||||
|
var basisDateString=$("input[id$='date_invoice']").val();
|
||||||
|
const parts = basisDateString.split(".");
|
||||||
|
var basisDay=parts[0];
|
||||||
|
var basisMonth=parts[1];
|
||||||
|
var basisYear=parts[2];
|
||||||
|
|
||||||
|
|
||||||
|
var basisDate = new Date();
|
||||||
|
basisDate.setFullYear(basisYear);
|
||||||
|
basisDate.setMonth(basisMonth-1);
|
||||||
|
basisDate.setDate(basisDay);
|
||||||
|
|
||||||
|
|
||||||
|
// get days,month,year from
|
||||||
|
var newDate = new Date(basisDate.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||||
|
|
||||||
|
var day = '' + newDate.getDate();
|
||||||
|
if (day.length == 1) {
|
||||||
|
day = '0' + day;
|
||||||
|
}
|
||||||
|
var month = '' + (newDate.getMonth() + 1);
|
||||||
|
if (month.length == 1) {
|
||||||
|
month = '0' + month;
|
||||||
|
}
|
||||||
|
var year = '' + newDate.getFullYear();
|
||||||
|
year = year.substring(2);
|
||||||
|
|
||||||
|
// ddmmyy
|
||||||
|
var dateFormated = day + month + year;
|
||||||
|
//alert(dateFormated);
|
||||||
|
|
||||||
|
var dateInput=$(this).next();
|
||||||
|
dateInput.val(dateFormated);
|
||||||
|
validateBuchungsDatum(dateInput);
|
||||||
|
|
||||||
|
// clear input
|
||||||
|
$(this).val('');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// erweitere datums eingabe
|
||||||
|
// TTMM
|
||||||
|
// TTMMYY
|
||||||
|
// TT-MM-YY
|
||||||
|
// TT.MM.YY
|
||||||
|
// jahreszahl falls zweistellig
|
||||||
|
function validateBuchungsDatum(item) {
|
||||||
|
|
||||||
|
//var mhd = $("[id$=mhdinput_id]");
|
||||||
|
var mhd = $(item);
|
||||||
|
var text = $(mhd).val();
|
||||||
|
|
||||||
|
while (text.indexOf('-') > -1) {
|
||||||
|
text = text.replace("-", ".");
|
||||||
|
}
|
||||||
|
var d = new Date();
|
||||||
|
|
||||||
|
// check for TTMMYY
|
||||||
|
if (text.length == 6 && text.indexOf('.') == -1) {
|
||||||
|
text = text.substring(0, 2) + "." + text.substring(2, 4)
|
||||||
|
+ ".20" + text.substring(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
// check for TTMM
|
||||||
|
if (text.length == 4 && text.indexOf('.') == -1) {
|
||||||
|
text = text.substring(0, 2) + "." + text.substring(2);
|
||||||
|
text = text + "." + d.getFullYear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// check for missing full year
|
||||||
|
var n = text.lastIndexOf(".");
|
||||||
|
if (n > 0 && n > text.length - 4) {
|
||||||
|
// we insert 20
|
||||||
|
var left = text.substring(0, n + 1);
|
||||||
|
var right = text.substring(n + 1);
|
||||||
|
text = left + "20" + right;
|
||||||
|
}
|
||||||
|
|
||||||
|
// update field....
|
||||||
|
$(mhd).val(text);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,10 @@
|
||||||
/* Custom Design */
|
/* Custom Design */
|
||||||
|
|
||||||
|
|
||||||
|
.alexander-logistic-date {
|
||||||
|
width: 110px !important;
|
||||||
|
background: url(./calendar_14.png) no-repeat scroll left center white
|
||||||
|
!important;
|
||||||
|
background-position: 4px 6px, center !important;
|
||||||
|
padding-left: 22px !important;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||||
|
xmlns:f="http://xmlns.jcp.org/jsf/core"
|
||||||
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:marty="http://xmlns.jcp.org/jsf/composite/marty">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h:inputText value="#{workitem.item[name]}"
|
||||||
|
onchange="validateBuchungsDatum(this,true);" id="date_invoice"
|
||||||
|
required="false" styleClass="alexander-logistic-date">
|
||||||
|
<f:convertDateTime pattern="#{message.datePatternShort}"
|
||||||
|
timeZone="#{message.timeZone}" />
|
||||||
|
</h:inputText>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||||
|
xmlns:f="http://xmlns.jcp.org/jsf/core"
|
||||||
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:marty="http://xmlns.jcp.org/jsf/composite/marty">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h:inputText value="#{workitem.item[namesub]}" style="width:2em;" class="alexander-logistic-date-days" />
|
||||||
|
<h:inputText value="#{workitem.item[name]}"
|
||||||
|
onchange="validateBuchungsDatum(this,true);" id="date_invoice"
|
||||||
|
required="false" styleClass="alexander-logistic-date">
|
||||||
|
<f:convertDateTime pattern="#{message.datePatternShort}"
|
||||||
|
timeZone="#{message.timeZone}" />
|
||||||
|
|
||||||
|
</h:inputText>
|
||||||
|
<ui:param name="namesub" value="#{name}_days"></ui:param>
|
||||||
|
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
|
||||||
6681
workflow/rechnungseingang-de-1.2.12.bpmn
Normal file
6681
workflow/rechnungseingang-de-1.2.12.bpmn
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue