started versison 1.1.1 buchungsperiode auf positionsebene
This commit is contained in:
parent
79b6983ae9
commit
a0e2655c1e
5 changed files with 37 additions and 10 deletions
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>office-alexander-logistics</artifactId>
|
||||
<groupId>com.alexander-logistics</groupId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.1.1</version>
|
||||
</parent>
|
||||
<artifactId>office-alexander-logistics-app</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ public class InvoicePlugin extends AbstractPlugin {
|
|||
// XX-YYY-####-###
|
||||
public static final String REGEX_POSNUMER = "([A-Z]{2}-[A-Z]{3}-[0-9]{4}-[0-9]{3})";
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static Logger logger = Logger.getLogger(InvoicePlugin.class.getName());
|
||||
|
||||
/**
|
||||
|
|
@ -74,13 +73,15 @@ public class InvoicePlugin extends AbstractPlugin {
|
|||
"Eingabefehler - Bitte wählen Sie eine Zahlungsart aus!");
|
||||
}
|
||||
// doppelte Rechnungsnummer prüfen
|
||||
if (workitem.getTaskID() == TASK_ERFASSUNG ) {
|
||||
if (workitem.getTaskID() == TASK_ERFASSUNG) {
|
||||
validateInvoiceNumber(workitem);
|
||||
}
|
||||
|
||||
if (workitem.getTaskID() == TASK_ERFASSUNG || workitem.getTaskID() == TASK_SACHPRUEFUNG) {
|
||||
// Buchungsperiode auf plausi prüfen
|
||||
validateBuchungsperiode(workitem);
|
||||
if ("workitem".equals(workitem.getType())) {
|
||||
validateBuchungsperiode(workitem.getItemValueString("invoice.period"));
|
||||
}
|
||||
// Cargosoft Kreditorennnummer prüfen
|
||||
validateCargosoftCdtrNumber(workitem);
|
||||
}
|
||||
|
|
@ -126,6 +127,12 @@ public class InvoicePlugin extends AbstractPlugin {
|
|||
"Eingabefehler - Der Nettobetrag in in Zeile " + posItem.getItemValueString("numpos")
|
||||
+ " darf nicht 0 sein!");
|
||||
}
|
||||
|
||||
// Buchunsperiode
|
||||
if (!posItem.getItemValueString("invoice.period").trim().isEmpty()) {
|
||||
validateBuchungsperiode(posItem.getItemValueString("invoice.period"));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -142,10 +149,10 @@ public class InvoicePlugin extends AbstractPlugin {
|
|||
* @param workitem
|
||||
* @throws PluginException
|
||||
*/
|
||||
private void validateBuchungsperiode(ItemCollection workitem) throws PluginException {
|
||||
String period = workitem.getItemValueString("invoice.period");
|
||||
private void validateBuchungsperiode(String period) throws PluginException {
|
||||
|
||||
// buchungsperionde nur prüfen wenn noch nicht archiviert
|
||||
if (!period.isEmpty() && "workitem".equals(workitem.getType())) {
|
||||
if (!period.isEmpty()) {
|
||||
LocalDate localDate = LocalDate.now();
|
||||
int year = localDate.getYear();
|
||||
// build regex....
|
||||
|
|
@ -217,6 +224,13 @@ public class InvoicePlugin extends AbstractPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hilfsmethod prüft ob die cdtr.nummer mit einer nummer aus der Cargosoft
|
||||
* Import Datei übereinstimmt.
|
||||
*
|
||||
* @param workitem
|
||||
* @throws PluginException
|
||||
*/
|
||||
private void validateCargosoftCdtrNumber(ItemCollection workitem) throws PluginException {
|
||||
String crdtrNumber = workitem.getItemValueString("cdtr.number");
|
||||
|
||||
|
|
@ -249,7 +263,7 @@ public class InvoicePlugin extends AbstractPlugin {
|
|||
* converts the Map List of a workitem into a List of ItemCollectons
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected List<ItemCollection> explodeChildList(ItemCollection workitem) {
|
||||
protected static List<ItemCollection> explodeChildList(ItemCollection workitem) {
|
||||
// convert current list of childItems into ItemCollection elements
|
||||
ArrayList<ItemCollection> childItems = new ArrayList<ItemCollection>();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
*</span></th>
|
||||
<th style="width: 100px;">Leistungsart<span
|
||||
class="imixs-required"> *</span></th>
|
||||
<th style="width: 80px;">BP<span
|
||||
class="imixs-required"> *</span></th>
|
||||
<th style="width: 150px; text-align: right;">Netto</th>
|
||||
<th style="width: 150px; text-align: right;">Brutto</th>
|
||||
<th style="">
|
||||
|
|
@ -71,6 +73,13 @@
|
|||
<f:selectItem itemLabel="Zoll" itemValue="Zoll"></f:selectItem>
|
||||
</h:selectOneMenu></td>
|
||||
|
||||
|
||||
<!-- Buchungsperiode -->
|
||||
<td><h:inputText
|
||||
value="#{orderitem.item['invoice.period']}"
|
||||
style="width:100%;">
|
||||
</h:inputText></td>
|
||||
|
||||
<!-- Netto Betrag -->
|
||||
<td style="text-align: right;"><h:inputText
|
||||
value="#{orderitem.item['amount']}" a:data-id="orderitem_amount"
|
||||
|
|
@ -100,6 +109,7 @@
|
|||
<td />
|
||||
<td />
|
||||
<td />
|
||||
<td />
|
||||
<td data-id="orderlist_summary_net"
|
||||
style="text-align: right; padding-right: 10px; font-wight: normal;"></td>
|
||||
<td data-id="orderlist_summary"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
*</span></th>
|
||||
<th style="width: 100px;">Steuer</th>
|
||||
<th style="width: 100px;">Leistungsart</th>
|
||||
<th style="width: 80px;">BP</th>
|
||||
<th style="width: 150px; text-align: right;">Netto</th>
|
||||
<th style="width: 150px; text-align: right;">Brutto</th>
|
||||
</tr>
|
||||
|
|
@ -35,6 +36,8 @@
|
|||
|
||||
<td><h:outputText value="#{orderitem.item['category']}" /></td>
|
||||
|
||||
<td><h:outputText value="#{orderitem.item['invoice.period']}" /></td>
|
||||
|
||||
<td style="text-align: right;"><h:outputText
|
||||
value="#{orderitem.item['amount']}" /></td>
|
||||
|
||||
|
|
@ -49,7 +52,7 @@
|
|||
<td />
|
||||
<td />
|
||||
<td />
|
||||
|
||||
<td />
|
||||
<td style="text-align: right;">Summe:</td>
|
||||
<td class="orderlist_summary" style="text-align: right;"><h:outputText
|
||||
value="#{workitem.item['order.total.net']}">
|
||||
|
|
|
|||
2
pom.xml
2
pom.xml
|
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.alexander-logistics</groupId>
|
||||
<artifactId>office-alexander-logistics</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.1.1</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Imixs Office Workflow - Custom Build</name>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue