int-dbcons-pgsql - Build # 2771 - Failure:
Check console output at https://ci.openbravo.com/job/int-dbcons-pgsql/2771/ to
view the results.
Committers since last success:
Changes for Build #2771
Mark <[email protected]> null
Fixes issue 35772: Orders with Invoice Terms different from Customer
Schedule
After Delivery cannot be invoiced if the bp has an invoice schedule
Sales Orders with Invoice Terms different from Customer Schedule After Delivery
(Immediate, After Delivery, After Order Delivered) cannot be invoiced if the
business
partner has an invoice schedule defined and the order does not fill its
requirement
The problem is that the order is not returned by the C_INVOICE_CANDIDATE_V view.
To avoid it was fixed the condition that takes into account the invoice rule of
the order and the sales invoice frequency.
src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml
Last 20 lines of the console output:
[...truncated 1347 lines...]
<?xml version="1.0"?>
<database name="VIEW C_INVOICE_CANDIDATE_V">
- <view name="C_INVOICE_CANDIDATE_V"><![CDATA[SELECT o.ad_client_id,
o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered,
o.c_doctype_id, o.totallines AS amountlines, o.grandtotal AS amountlinesgross,
sum(round((l.qtyordered - l.qtyinvoiced) * l.priceactual, c.stdprecision)) AS
notinvoicedlines, round(sum(round((l.qtyordered - l.qtyinvoiced) *
l.priceactual, c.stdprecision) * (1 + t.rate / 100)), c.stdprecision) AS
notinvoicedlinesgross, o.invoicerule AS term, sum(round((l.qtydelivered -
l.qtyinvoiced) * l.priceactual, c.stdprecision)) AS pendinglines,
round(sum(round((l.qtydelivered - l.qtyinvoiced) * l.priceactual,
c.stdprecision) * (1 + t.rate / 100)), c.stdprecision) AS pendinglinesgross,
sum(abs(l.qtyordered)) AS qtyordered, sum(abs(l.qtydelivered)) AS qtydelivered
FROM c_order o JOIN c_doctype dt ON o.c_doctype_id = dt.c_doctype_id JOIN
c_bpartner bp ON o.c_bpartner_id = bp.c_bpartner_id JOIN c_currency c ON
o.c_currency_id = c.c_currency_id JOIN c_orderline l ON o.c_order_id =
l.c_order_id JOIN c_tax t ON t.c_tax_id = l.c_tax_id LEFT JOIN
c_invoiceschedule si ON bp.c_invoiceschedule_id = si.c_invoiceschedule_id WHERE
o.docstatus IN ('CO', 'CL', 'IP') AND dt.docbasetype = 'SOO' AND
dt.docsubtypeso NOT IN ('ON', 'OB', 'WR') AND (o.invoicerule = 'I' OR
o.invoicerule = 'O' OR o.invoicerule = 'D' OR o.invoicerule = 'S' AND
(si.invoicefrequency IS NULL OR si.invoicefrequency = 'D' OR
si.invoicefrequency = 'W' OR si.invoicefrequency = 'T' AND trunc(o.dateordered)
<= (trunc(now(), 'MM') + si.invoicedaycutoff - 1) AND trunc(now()) >=
(trunc(o.dateordered, 'MM') + si.invoiceday - 1) OR trunc(o.dateordered) <=
(trunc(now(), 'MM') + si.invoicedaycutoff + 14) AND trunc(now()) >=
(trunc(o.dateordered, 'MM') + si.invoiceday + 14) OR si.invoicefrequency = 'M'
AND trunc(o.dateordered) <= (trunc(now(), 'MM') + si.invoicedaycutoff - 1) AND
trunc(now()) >= (trunc(o.dateordered, 'MM') + si.invoiceday - 1))) AND
(abs(l.qtyordered - l.qtyinvoiced) <> 0 OR abs(l.qtydelivered - l.qtyinvoiced)
<> 0) GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id,
o.documentno, o.dateordered, o.c_doctype_id, o.totallines, o.grandtotal,
o.invoicerule, c.c_currency_id, c.stdprecision]]></view>
+ <view name="C_INVOICE_CANDIDATE_V"><![CDATA[SELECT o.ad_client_id,
o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered,
o.c_doctype_id, o.totallines AS amountlines, o.grandtotal AS amountlinesgross,
sum(round((l.qtyordered - l.qtyinvoiced) * l.priceactual, c.stdprecision)) AS
notinvoicedlines, round(sum(round((l.qtyordered - l.qtyinvoiced) *
l.priceactual, c.stdprecision) * (1 + t.rate / 100)), c.stdprecision) AS
notinvoicedlinesgross, o.invoicerule AS term, sum(round((l.qtydelivered -
l.qtyinvoiced) * l.priceactual, c.stdprecision)) AS pendinglines,
round(sum(round((l.qtydelivered - l.qtyinvoiced) * l.priceactual,
c.stdprecision) * (1 + t.rate / 100)), c.stdprecision) AS pendinglinesgross,
sum(abs(l.qtyordered)) AS qtyordered, sum(abs(l.qtydelivered)) AS qtydelivered
FROM c_order o JOIN c_doctype dt ON o.c_doctype_id = dt.c_doctype_id JOIN
c_bpartner bp ON o.c_bpartner_id = bp.c_bpartner_id JOIN c_currency c ON
o.c_currency_id = c.c_currency_id JOIN c_orderline l ON o.c_order_id =
l.c_order_id JOIN c_tax t ON t.c_tax_id = l.c_tax_id LEFT JOIN
c_invoiceschedule si ON bp.c_invoiceschedule_id = si.c_invoiceschedule_id WHERE
(o.docstatus IN ('CO', 'CL', 'IP')) AND dt.docbasetype = 'SOO' AND
(dt.docsubtypeso NOT IN ('ON', 'OB', 'WR')) AND (o.invoicerule = 'I' OR
o.invoicerule = 'O' OR o.invoicerule = 'D' OR o.invoicerule = 'S' AND
(si.invoicefrequency IS NULL OR si.invoicefrequency = 'D' OR
si.invoicefrequency = 'W' OR si.invoicefrequency = 'T' AND trunc(o.dateordered)
<= (trunc(now(), 'MM') + si.invoicedaycutoff - 1) AND trunc(now()) >=
(trunc(o.dateordered, 'MM') + si.invoiceday - 1) OR trunc(o.dateordered) <=
(trunc(now(), 'MM') + si.invoicedaycutoff + 14) AND trunc(now()) >=
(trunc(o.dateordered, 'MM') + si.invoiceday + 14) OR si.invoicefrequency = 'M'
AND trunc(o.dateordered) <= (trunc(now(), 'MM') + si.invoicedaycutoff - 1) AND
trunc(now()) >= (trunc(o.dateordered, 'MM') + si.invoiceday - 1))) AND
(abs(l.qtyordered - l.qtyinvoiced) <> 0 OR abs(l.qtydelivered - l.qtyinvoiced)
<> 0) GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id,
o.documentno, o.dateordered, o.c_doctype_id, o.totallines, o.grandtotal,
o.invoicerule, c.c_currency_id, c.stdprecision]]></view>
</database>
reverting src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml
ERROR: found differences
* FAILURE: DBconsistency ERP
LOG:
https://ci.openbravo.com/job/int-dbcons-pgsql/2771/artifact/dbconsistency.log/*view*/
Build step 'Execute managed script' marked build as failure
Checking console output
/srv/ci/jobs/int-dbcons-pgsql/builds/2771/log:
ERROR: found differences
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-builds mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-builds