InvoicePayment bug fixed
authorVásáry Dániel <vasary@elgekko.net>
Fri, 1 Mar 2024 12:40:36 +0000 (13:40 +0100)
committerVásáry Dániel <vasary@elgekko.net>
Fri, 1 Mar 2024 12:40:36 +0000 (13:40 +0100)
sly-crm-app/src/main/resources/application-dev.yaml
sly-crm-ui/src/main/java/hu/user/lis/ui/converter/DoubleToStringConverter.java
sly-crm-ui/src/main/resources/web/invoice-payment.zul

index ae55e134328333b88efdf938b2b0def07906fada..5fc5748c545ea7754a577489fdf65f42e08ddc76 100644 (file)
@@ -20,12 +20,12 @@ spring:
       enabled: always
   datasource:
     type: com.zaxxer.hikari.HikariDataSource
-    #    url: jdbc:db2://localhost:50000/slycrm
-    #    username: db2admin
-    #    password: password
-    url: jdbc:db2://db2.in.useribm.hu:50000/slycrm
+    url: jdbc:db2://localhost:50000/slycrm
     username: db2admin
-    password: Passw@rd01
+    password: password
+#    url: jdbc:db2://db2.in.useribm.hu:50000/slycrm
+#    username: db2admin
+#    password: Passw@rd01
 camunda.bpm:
   generic-properties.properties:
     telemetry-reporter-activate: false
@@ -59,7 +59,7 @@ application:
   ui:
     user-name: user
     password: password
-    disable-profile-save: true
+  #    disable-profile-save: true
   workflow:
     import-invoice:
       input-path: /temp/invoice-import
index c852e0fbb572c6fcea2472393d9ce38ccb4bece5..6d8b2a908d0f91d95863e024152384e3037c1096 100644 (file)
@@ -9,6 +9,7 @@ import org.zkoss.zk.ui.Component;
 import java.math.RoundingMode;
 import java.text.NumberFormat;
 import java.util.Locale;
+import java.util.Objects;
 
 @Log4j2
 public class DoubleToStringConverter implements Converter<String, Double, Component> {
@@ -21,8 +22,8 @@ public class DoubleToStringConverter implements Converter<String, Double, Compon
     }
 
     @Override
-    public String coerceToUi(Double date, Component listCell, BindContext bindContext) {
-        return nf.format(date);
+    public String coerceToUi(Double data, Component listCell, BindContext bindContext) {
+        return Objects.isNull(data) ? null : nf.format(data);
     }
 
     @Override
index 8700fa408d552b3e51848999c546d0274546885c..25912ee9af7bde8a9cb30b0999f7748483791ec8 100644 (file)
@@ -33,7 +33,7 @@
             <center border="none" hflex="true" vflex="true">
 
                 <hbox hflex="true" vflex="true" visible="@load(vm.formDocument)">
-                    <window title="Számla adatok" hflex="true" vflex="true" border="normal" style="margin: 10px">
+                    <window title="Számla adatok" hflex="true" vflex="true" border="normal">
                         <vlayout hflex="true">
                             <vlayout hflex="true">
                                 <label value="Projekt"/>
@@ -49,8 +49,7 @@
 
                     <splitter/>
 
-                    <window title="Számla kiegyenlítés" hflex="true" vflex="true" border="normal"
-                            style="margin: 10px">
+                    <window title="Számla kiegyenlítés" hflex="true" vflex="true" border="normal">
                         <borderlayout>
                             <north hflex="true">
                                 <toolbar>
                                             </listcell>
                                             <listcell>
                                                 <textbox instant="true" inplace="true" sclass="number-box" width="100%"
-                                                         value="@bind(each.grossAmount) @validator(vm) @converter('hu.user.lis.ui.converter.DoubleToStringConverter')"
+                                                         value="@bind(each.grossAmount) @converter('hu.user.lis.ui.converter.DoubleToStringConverter')"
                                                          onChange="@command('onPaymentChanged', entity=each)"
                                                          w:onBind="configureFloat(this.$n())"
-                                                         c:onPaste="preventPastingNonDigit(event)"
-                                                         disabled="@bind(vm.readonlyForm)"/>
+                                                         c:onPaste="preventPastingNonDigit(event)"/>
                                             </listcell>
                                             <listcell>
                                                 <button iconSclass="z-icon-remove"