Attached Files | see100.jpg [^] (250,113 bytes) 2022-05-05 14:43
49238.diff [^] (6,075 bytes) 2022-05-23 13:50 [Show Content] [Hide Content]diff --git a/src-db/database/sourcedata/AD_COLUMN.xml b/src-db/database/sourcedata/AD_COLUMN.xml
index 24572f9a57..db9a319937 100644
--- a/src-db/database/sourcedata/AD_COLUMN.xml
+++ b/src-db/database/sourcedata/AD_COLUMN.xml
@@ -355748,7 +355748,7 @@ Invoices marked as Credit Memo will behave as Credit Memos, which implies that:
<!--9E82E728716246B393C40D2CDCA0133A--> <DESCRIPTION><![CDATA[Delivery Status]]></DESCRIPTION>
<!--9E82E728716246B393C40D2CDCA0133A--> <COLUMNNAME><![CDATA[DeliveryStatus]]></COLUMNNAME>
<!--9E82E728716246B393C40D2CDCA0133A--> <AD_TABLE_ID><![CDATA[259]]></AD_TABLE_ID>
-<!--9E82E728716246B393C40D2CDCA0133A--> <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
+<!--9E82E728716246B393C40D2CDCA0133A--> <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
<!--9E82E728716246B393C40D2CDCA0133A--> <FIELDLENGTH><![CDATA[4]]></FIELDLENGTH>
<!--9E82E728716246B393C40D2CDCA0133A--> <ISKEY><![CDATA[N]]></ISKEY>
<!--9E82E728716246B393C40D2CDCA0133A--> <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -355771,7 +355771,7 @@ Invoices marked as Credit Memo will behave as Credit Memos, which implies that:
<!--9E82E728716246B393C40D2CDCA0133A--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
<!--9E82E728716246B393C40D2CDCA0133A--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
<!--9E82E728716246B393C40D2CDCA0133A--> <SQLLOGIC><![CDATA[(coalesce((select case when sum(abs(ol.qtyordered)) = 0 or iscancelled = 'Y' or cancelledorder_id is not null then 0 else
-round(coalesce(sum(abs(ol.qtydelivered)), 0)/sum(abs(ol.qtyordered)) * 100, 0) end
+round(coalesce(sum(abs(ol.qtydelivered)), 0)/sum(abs(ol.qtyordered)) * 100, 2) end
from c_orderline ol where ol.c_order_id=c_order_id and ol.c_order_discount_id is null),0))]]></SQLLOGIC>
<!--9E82E728716246B393C40D2CDCA0133A--> <ALLOWSORTING><![CDATA[N]]></ALLOWSORTING>
<!--9E82E728716246B393C40D2CDCA0133A--> <ALLOWFILTERING><![CDATA[N]]></ALLOWFILTERING>
@@ -356107,7 +356107,7 @@ Exception: The alert has been acknowledged but not action is going to be made to
<!--9F1044EB393B4D60895532DB5D568BEE--> <HELP><![CDATA[Percent paid of the order]]></HELP>
<!--9F1044EB393B4D60895532DB5D568BEE--> <COLUMNNAME><![CDATA[PaymentStatus]]></COLUMNNAME>
<!--9F1044EB393B4D60895532DB5D568BEE--> <AD_TABLE_ID><![CDATA[259]]></AD_TABLE_ID>
-<!--9F1044EB393B4D60895532DB5D568BEE--> <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
+<!--9F1044EB393B4D60895532DB5D568BEE--> <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
<!--9F1044EB393B4D60895532DB5D568BEE--> <FIELDLENGTH><![CDATA[4]]></FIELDLENGTH>
<!--9F1044EB393B4D60895532DB5D568BEE--> <ISKEY><![CDATA[N]]></ISKEY>
<!--9F1044EB393B4D60895532DB5D568BEE--> <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -356131,7 +356131,7 @@ Exception: The alert has been acknowledged but not action is going to be made to
<!--9F1044EB393B4D60895532DB5D568BEE--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
<!--9F1044EB393B4D60895532DB5D568BEE--> <SQLLOGIC><![CDATA[(coalesce((select case
when sum(fps.amount) = 0 then 0
- else round(sum(fps.paidamt)/sum(fps.amount) * 100, 0) end
+ else round(sum(fps.paidamt)/sum(fps.amount) * 100, 2) end
from FIN_Payment_Schedule fps where fps.c_order_id=c_order_id),0))]]></SQLLOGIC>
<!--9F1044EB393B4D60895532DB5D568BEE--> <ALLOWSORTING><![CDATA[N]]></ALLOWSORTING>
<!--9F1044EB393B4D60895532DB5D568BEE--> <ALLOWFILTERING><![CDATA[N]]></ALLOWFILTERING>
@@ -369494,7 +369494,7 @@ By default the type is empty (null), which means the product characteristic does
<!--B5B203AE8D674B8DABC6669419815CA7--> <NAME><![CDATA[Invoice Status]]></NAME>
<!--B5B203AE8D674B8DABC6669419815CA7--> <COLUMNNAME><![CDATA[InvoiceStatus]]></COLUMNNAME>
<!--B5B203AE8D674B8DABC6669419815CA7--> <AD_TABLE_ID><![CDATA[259]]></AD_TABLE_ID>
-<!--B5B203AE8D674B8DABC6669419815CA7--> <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
+<!--B5B203AE8D674B8DABC6669419815CA7--> <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
<!--B5B203AE8D674B8DABC6669419815CA7--> <FIELDLENGTH><![CDATA[4]]></FIELDLENGTH>
<!--B5B203AE8D674B8DABC6669419815CA7--> <ISKEY><![CDATA[N]]></ISKEY>
<!--B5B203AE8D674B8DABC6669419815CA7--> <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -369517,7 +369517,7 @@ By default the type is empty (null), which means the product characteristic does
<!--B5B203AE8D674B8DABC6669419815CA7--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
<!--B5B203AE8D674B8DABC6669419815CA7--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
<!--B5B203AE8D674B8DABC6669419815CA7--> <SQLLOGIC><![CDATA[(coalesce((select case when sum(abs(ol.qtyordered)) = 0 or iscancelled = 'Y' or cancelledorder_id is not null then 0 else
-round(coalesce(sum(abs(ol.qtyinvoiced)), 0)/sum(abs(ol.qtyordered)) * 100, 0) end
+round(coalesce(sum(abs(ol.qtyinvoiced)), 0)/sum(abs(ol.qtyordered)) * 100, 2) end
from c_orderline ol where ol.c_order_id=c_order_id and ol.c_order_discount_id is null), 0))]]></SQLLOGIC>
<!--B5B203AE8D674B8DABC6669419815CA7--> <ALLOWSORTING><![CDATA[N]]></ALLOWSORTING>
<!--B5B203AE8D674B8DABC6669419815CA7--> <ALLOWFILTERING><![CDATA[N]]></ALLOWFILTERING>
diff --git a/src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java b/src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java
index ba9b3a9309..8b700bea86 100644
--- a/src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java
+++ b/src/org/openbravo/materialmgmt/InvoiceGeneratorFromGoodsShipment.java
@@ -295,7 +295,7 @@ public class InvoiceGeneratorFromGoodsShipment {
invoicePendingQtyForShipmentLine(shipmentLine, getQtyToInvoice(orderLine));
} else {
if (InvoiceTerm.AFTER_ORDER_DELIVERY.getInvoiceTerm().equals(invoiceTerm)) {
- if (order.getDeliveryStatus() >= 100
+ if (order.getDeliveryStatus().compareTo(new BigDecimal(100)) >= 0
&& !ordersWithAfterOrderDeliveryAlreadyInvoiced.contains(order.getId())) {
invoiceAllOrderLines(order);
ordersWithAfterOrderDeliveryAlreadyInvoiced.add(order.getId());
|