Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.27k stars 2.73k forks source link

Error with report by month sales tax 2 #9428

Closed JosQuelqu1 closed 2 years ago

JosQuelqu1 commented 6 years ago

Bug

Dolibarr has detected a technical error. This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices): Date: 20180906190650 Dolibarr: 8.0.0 Level of features: 0 PHP: 7.2.7-0ubuntu0.18.04.2 Server: Apache/2.4.29 (Ubuntu) OS: Linux lapp 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0

Requested URL: /dolibarr/compta/localtax/quadri_detail.php?leftmenu=tax_vat&month=9&year=2018 Referer: http://10.0.0.7/dolibarr/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1 Menu manager: eldy_menu.php

Database type manager: pgsql Latest database access request error: SELECT d.rowid, d.product_type as dtype, d.fk_facture as facid, d.localtax_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.total_tva as total_vat, d.description as descr, d.total_localtax1 as total_localtax1, d.total_localtax2 as total_localtax2, d.date_start as date_start, d.date_end as date_end, f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id, p.rowid as pid, p.ref as pref, p.fk_product_type as ptype, 0 as payment_id, 0 as payment_amount FROM llx_facture as f, llx_societe as s, llx_facturedet as d LEFT JOIN llx_product as p on d.fk_product = p.rowid WHERE f.entity = 1 AND f.fk_statut in (1,2) AND f.type IN (0,1,2,3,5) AND f.rowid = d.fk_facture AND s.rowid = f.fk_soc AND f.datef >= '2018-09-01 00:00:00' AND f.datef <= '2018-09-30 23:59:59' AND (d.product_type = 0 AND d.date_start is null AND d.date_end IS NULL) AND (d.localtax_tx <> 0 OR d.total_tva <> 0) ORDER BY d.rowid, d.fk_facture Return code for latest database access request error: DB_ERROR_NOSUCHFIELD Information for latest database access request error: ERROR: 42703: column d.localtax_tx does not exist\nLINE 1: ..., d.product_type as dtype, d.fk_facture as facid, d.localtax...\n ^\nHINT: Perhaps you meant to reference the column "d.localtax1_tx" or the column "d.localtax2_tx".\nLOCATION: errorMissingColumn, parse_relation.c:3311

Dolibarr has detected a technical error. This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices): Date: 20180906190650 Dolibarr: 8.0.0 Level of features: 0 PHP: 7.2.7-0ubuntu0.18.04.2 Server: Apache/2.4.29 (Ubuntu) OS: Linux lapp 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0

Requested URL: /dolibarr/compta/localtax/quadri_detail.php?leftmenu=tax_vat&month=9&year=2018 Referer: http://10.0.0.7/dolibarr/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1 Menu manager: eldy_menu.php

Database type manager: pgsql Latest database access request error: SELECT d.rowid, d.product_type as dtype, d.fk_facture_fourn as facid, d.localtax_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.tva as total_vat, d.description as descr, d.total_localtax1 as total_localtax1, d.total_localtax2 as total_localtax2, d.date_start as date_start, d.date_end as date_end, f.ref as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id, p.rowid as pid, p.ref as pref, p.fk_product_type as ptype, 0 as payment_id, 0 as payment_amount FROM llx_facture_fourn as f, llx_societe as s, llx_facture_fourn_det as d LEFT JOIN llx_product as p on d.fk_product = p.rowid WHERE f.entity = 1 AND f.fk_statut in (1,2) AND f.type IN (0,1,2,3,5) AND f.rowid = d.fk_facture_fourn AND s.rowid = f.fk_soc AND f.datef >= '2018-09-01 00:00:00' AND f.datef <= '2018-09-30 23:59:59' AND (d.product_type = 0 AND d.date_start is null AND d.date_end IS NULL) AND (d.localtax_tx <> 0 OR d.tva <> 0) ORDER BY d.rowid, d.fk_facture_fourn Return code for latest database access request error: DB_ERROR_NOSUCHFIELD Information for latest database access request error: ERROR: 42703: column d.localtax_tx does not exist\nLINE 1: ...oduct_type as dtype, d.fk_facture_fourn as facid, d.localtax...\n ^\nHINT: Perhaps you meant to reference the column "d.localtax1_tx" or the column "d.localtax2_tx".\nLOCATION: errorMissingColumn, parse_relation.c:3311

Environment

Steps to reproduce the behavior

Click on "Billing | Payment". Under Special expenses click "Sales tax 2" and "Report by month". Select a month.

JosQuelqu1 commented 6 years ago

Still have the issue with 8.0.2

JosQuelqu1 commented 5 years ago

Still have the issue with 8.0.4

JosQuelqu1 commented 5 years ago

I just noticed. It's saying "report tax 3". I don't have tax 3 and it should be tax 2.

JosQuelqu1 commented 5 years ago

Still there in 9,0,3

Dolibarr has detected a technical error. This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices): Date: 20190526000715 Dolibarr: 9.0.3 Level of features: 0 PHP: 7.2.17-0ubuntu0.18.04.1 Server: Apache/2.4.29 (Ubuntu) OS: Linux lapp 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019 x86_64 UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

Requested URL: /dolibarr/compta/localtax/quadri_detail.php?leftmenu=tax_vat&month=3&year=2019 Referer: http://10.0.0.7/dolibarr/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1 Menu manager: eldy_menu.php

Database type manager: pgsql Latest database access request error: SELECT d.rowid, d.product_type as dtype, d.fk_facture as facid, d.localtax_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.total_tva as total_vat, d.description as descr, d.total_localtax1 as total_localtax1, d.total_localtax2 as total_localtax2, d.date_start as date_start, d.date_end as date_end, f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id, p.rowid as pid, p.ref as pref, p.fk_product_type as ptype, 0 as payment_id, 0 as payment_amount FROM llx_facture as f, llx_societe as s, llx_facturedet as d LEFT JOIN llx_product as p on d.fk_product = p.rowid WHERE f.entity = 1 AND f.fk_statut in (1,2) AND f.type IN (0,1,2,3,5) AND f.rowid = d.fk_facture AND s.rowid = f.fk_soc AND f.datef >= '2019-03-01 00:00:00' AND f.datef <= '2019-03-31 23:59:59' AND (d.product_type = 0 AND d.date_start is null AND d.date_end IS NULL) AND (d.localtax_tx <> 0 OR d.total_tva <> 0) ORDER BY d.rowid, d.fk_facture Return code for latest database access request error: DB_ERROR_NOSUCHFIELD Information for latest database access request error: ERROR: 42703: column d.localtax_tx does not exist\nLINE 1: ..., d.product_type as dtype, d.fk_facture as facid, d.localtax...\n ^\nHINT: Perhaps you meant to reference the column "d.localtax1_tx" or the column "d.localtax2_tx".\nLOCATION: errorMissingColumn, parse_relation.c:3311

Dolibarr has detected a technical error. This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices): Date: 20190526000715 Dolibarr: 9.0.3 Level of features: 0 PHP: 7.2.17-0ubuntu0.18.04.1 Server: Apache/2.4.29 (Ubuntu) OS: Linux lapp 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019 x86_64 UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

Requested URL: /dolibarr/compta/localtax/quadri_detail.php?leftmenu=tax_vat&month=3&year=2019 Referer: http://10.0.0.7/dolibarr/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1 Menu manager: eldy_menu.php

Database type manager: pgsql Latest database access request error: SELECT d.rowid, d.product_type as dtype, d.fk_facture_fourn as facid, d.localtax_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.tva as total_vat, d.description as descr, d.total_localtax1 as total_localtax1, d.total_localtax2 as total_localtax2, d.date_start as date_start, d.date_end as date_end, f.ref as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id, p.rowid as pid, p.ref as pref, p.fk_product_type as ptype, 0 as payment_id, 0 as payment_amount FROM llx_facture_fourn as f, llx_societe as s, llx_facture_fourn_det as d LEFT JOIN llx_product as p on d.fk_product = p.rowid WHERE f.entity = 1 AND f.fk_statut in (1,2) AND f.type IN (0,1,2,3,5) AND f.rowid = d.fk_facture_fourn AND s.rowid = f.fk_soc AND f.datef >= '2019-03-01 00:00:00' AND f.datef <= '2019-03-31 23:59:59' AND (d.product_type = 0 AND d.date_start is null AND d.date_end IS NULL) AND (d.localtax_tx <> 0 OR d.tva <> 0) ORDER BY d.rowid, d.fk_facture_fourn Return code for latest database access request error: DB_ERROR_NOSUCHFIELD Information for latest database access request error: ERROR: 42703: column d.localtax_tx does not exist\nLINE 1: ...oduct_type as dtype, d.fk_facture_fourn as facid, d.localtax...\n ^\nHINT: Perhaps you meant to reference the column "d.localtax1_tx" or the column "d.localtax2_tx".\nLOCATION: errorMissingColumn, parse_relation.c:3311

JosQuelqu1 commented 5 years ago

Still there in 10.0.0

JosQuelqu1 commented 5 years ago

Still ther in 10.0.1

dgfmdrv commented 4 years ago

Hello, We are using v10.0.3. I found this bug when I click on a month or subtotal under "Financiera->Pagos especiales->IRPF->Informe por mes" (I think it's the same option: Billing->payment->Sales tax 2) image

When I click on "Enero 2019" and change the url from:

/compta/localtax/quadri_detail.php?leftmenu=tax_vat&q=3&year=2019

to

/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&q=3&year=2019&localTaxType=2

Or when I clic on "Subtotal" and change url from

/compta/localtax/quadri_detail.php?leftmenu=tax_vat&month=1&year=2019

to

/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&month=1&year=2019&localTaxType=2 

The error disappears and lists something but it doesn't show quantities and total, but items look fine: image

ksar-ksar commented 3 years ago

Hi,

Still relevant on V13 ?

JosQuelqu1 commented 3 years ago

hi,

yes still there

I get this message Parameter localTaxType is missing

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).

ckibodeaux commented 2 years ago

This is present in 16.0 beta.

xasser commented 1 year ago

still the same in 17.0.2 attached

Screenshot 2023-08-06 at 8 55 21 PM copy Screenshot 2023-08-06 at 8 55 58 PM copy

elperepat commented 5 months ago

Still there in 19.01

In compta/localtax/index.php, replace line 450 with:

print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/localtax/quadri_detail.php?leftmenu=tax_vat&month='.$m.'&year='.$y.'&localTaxType='.$localTaxType.'">'.dol_print_date(dol_mktime(0, 0, 0, $m, 1, $y), "%b %Y").'</a></td>';

Patrick

diogos88 commented 2 months ago

Is there a fix for this problem?