exchangerate 5 stellig. InvoicePlugin prüft immer auf payment.type
This commit is contained in:
parent
3e455d8b0f
commit
70ef81baca
13 changed files with 18 additions and 2 deletions
|
|
@ -15,6 +15,8 @@ import org.imixs.workflow.exceptions.PluginException;
|
|||
* <p>
|
||||
* Konkret geht es darum, das im Status 5200 in den ChildItems keine leeren
|
||||
* Zeilen vorkommen dürfen.
|
||||
* <p>
|
||||
* Im Status 5000 muss immer der payment.type ausgewählt werden. Dies wird vom Plugin explizit geprüft
|
||||
*
|
||||
* @author rsoika
|
||||
* @version 1.0
|
||||
|
|
@ -22,6 +24,7 @@ import org.imixs.workflow.exceptions.PluginException;
|
|||
*/
|
||||
public class InvoicePlugin extends AbstractPlugin {
|
||||
|
||||
public static final int TASK_ERFASSUNG = 5000;
|
||||
public static final int TASK_SACHPRUEFUNG = 5200;
|
||||
public static final int EVENT_FREIGEBEN = 20;
|
||||
|
||||
|
|
@ -43,6 +46,16 @@ public class InvoicePlugin extends AbstractPlugin {
|
|||
@Override
|
||||
public ItemCollection run(ItemCollection workitem, ItemCollection documentActivity) throws PluginException {
|
||||
|
||||
// Payment.type muss immer eingetragne werden!
|
||||
if (workitem.getTaskID() >=TASK_ERFASSUNG) {
|
||||
if (workitem.getItemValueString("payment.type").trim().isEmpty()) {
|
||||
// throw a plugin exception!
|
||||
throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA,
|
||||
"Eingabefehler - Bitte wählen Sie eine Zahlungsart aus!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// die prüfung der positionsnummern und Category erfolgt nur im Status
|
||||
// Sachprüfung (5200) und nur beim Freigeben (20)!
|
||||
if (workitem.getTaskID() == TASK_SACHPRUEFUNG && workitem.getEventID() == EVENT_FREIGEBEN) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<dd>
|
||||
<h:inputText required="#{validationController.required}"
|
||||
value="#{workitem.item['invoice.exchangerate']}">
|
||||
<f:convertNumber />
|
||||
<f:convertNumber pattern="#0.00000"/>
|
||||
</h:inputText>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
|
|||
2
reports/rechnungen-offen-nosepa.imixs-report
Normal file
2
reports/rechnungen-offen-nosepa.imixs-report
Normal file
File diff suppressed because one or more lines are too long
1
reports/rechnungen-offen.imixs-report
Normal file
1
reports/rechnungen-offen.imixs-report
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue