';
// Ref supplier
diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php
index 656cd3c5553..69ea8839cfb 100644
--- a/htdocs/fourn/facture/info.php
+++ b/htdocs/fourn/facture/info.php
@@ -67,7 +67,7 @@ $head = facturefourn_prepare_head($object);
$titre = $langs->trans('SupplierInvoice');
print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
-$linkback = '
'.$langs->trans("BackToList").'';
+$linkback = '
'.$langs->trans("BackToList").'';
$morehtmlref = '
';
// Ref supplier
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index 4cb5b62831f..78f08dcd04e 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -533,7 +533,7 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
-if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
+if ($search_type_thirdparty != '' && $search_type_thirdparty >= 0) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_montant_ht != '') $sql .= natural_search('f.total_ht', $search_montant_ht, 1);
if ($search_montant_vat != '') $sql .= natural_search('f.total_tva', $search_montant_vat, 1);
if ($search_montant_localtax1 != '') $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1);
@@ -678,6 +678,7 @@ if ($resql)
if ($option) $param .= "&option=".urlencode($option);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
if ($search_categ_sup > 0) $param .= '&search_categ_sup='.urlencode($search_categ_sup);
+ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@@ -920,7 +921,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked']))
{
print '
';
- print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
+ print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print ' | ';
}
// Condition of payment
@@ -1301,7 +1302,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked']))
{
print '';
- if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1);
+ if (empty($typenArray)) $typenArray = $formcompany->typent_array(1);
print $typenArray[$obj->typent_code];
print ' | ';
if (!$i) $totalarray['nbfield']++;
diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php
index cbd9b76e45e..cb8da24052b 100644
--- a/htdocs/holiday/list.php
+++ b/htdocs/holiday/list.php
@@ -106,7 +106,7 @@ $search_month_end = GETPOST('search_month_end', 'int');
$search_year_end = GETPOST('search_year_end', 'int');
$search_employee = GETPOST('search_employee', 'int');
$search_valideur = GETPOST('search_valideur', 'int');
-$search_status = GETPOST('search_status', 'int');
+$search_status = GETPOST('search_statut', 'int');
$search_type = GETPOST('search_type', 'int');
// Initialize technical objects
diff --git a/htdocs/install/mysql/data/llx_c_typent.sql b/htdocs/install/mysql/data/llx_c_typent.sql
index ef725f43d98..d55d8fc67c2 100644
--- a/htdocs/install/mysql/data/llx_c_typent.sql
+++ b/htdocs/install/mysql/data/llx_c_typent.sql
@@ -32,7 +32,6 @@
delete from llx_c_typent;
-- Entries for all countries
-insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 0, 'TE_UNKNOWN', '-', NULL, 1);
insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 1, 'TE_STARTUP', 'Start-up', NULL, 0);
insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 2, 'TE_GROUP', 'Grand groupe', NULL, 1);
insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 3, 'TE_MEDIUM', 'PME/PMI', NULL, 1);
diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
index 694382be57d..9658d6c3051 100644
--- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
+++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
@@ -578,3 +578,5 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205);
+-- Removed no more used function
+-- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m CASCADE;
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index ae0673096d2..0aa6804daf6 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -119,6 +119,11 @@ ALTER TABLE llx_societe CHANGE fk_entrepot fk_warehouse INTEGER DEFAULT NULL;
--ALTER TABLE llx_societe ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse);
+-- VMYSQL4.3 ALTER TABLE llx_societe MODIFY COLUMN fk_typent integer NULL;
+-- VPGSQL8.2 ALTER TABLE llx_societe ALTER COLUMN fk_typent DROP NOT NULL;
+UPDATE llx_societe SET fk_typent=NULL WHERE fk_typent=0;
+DELETE FROM llx_c_typent WHERE code='TE_UNKNOWN';
+
ALTER TABLE llx_socpeople MODIFY poste varchar(255);
ALTER TABLE llx_menu ADD COLUMN prefix varchar(255) NULL AFTER titre;
@@ -128,40 +133,10 @@ ALTER TABLE llx_chargesociales ADD COLUMN fk_user integer DEFAULT NULL;
ALTER TABLE llx_fichinter ADD COLUMN last_main_doc varchar(255) AFTER model_pdf;
ALTER TABLE llx_projet ADD COLUMN last_main_doc varchar(255) AFTER model_pdf;
-RENAME TABLE llx_payment_salary TO llx_salary;
-RENAME TABLE llx_payment_salary_extrafields TO llx_salary_extrafields;
-
--- Rename indexes
-ALTER TABLE llx_salary DROP INDEX idx_payment_salary_ref;
-ALTER TABLE llx_salary ADD INDEX idx_salary_ref (num_payment);
-
-ALTER TABLE llx_salary DROP INDEX idx_payment_salary_user;
-ALTER TABLE llx_salary ADD INDEX idx_salary_user (fk_user, entity);
-
-ALTER TABLE llx_salary DROP INDEX idx_payment_salary_datep;
-ALTER TABLE llx_salary ADD INDEX idx_salary_datep (datep);
-
-ALTER TABLE llx_salary DROP INDEX idx_payment_salary_datesp;
-ALTER TABLE llx_salary ADD INDEX idx_salary_datesp (datesp);
-
-ALTER TABLE llx_salary DROP INDEX idx_payment_salary_dateep;
-ALTER TABLE llx_salary ADD INDEX idx_salary_dateep (dateep);
-
---ALTER TABLE llx_salary ADD CONSTRAINT fk_salary_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid);
---ALTER TABLE llx_salary DROP INDEX fk_payment_salary_user;
-
-ALTER TABLE llx_salary_extrafields DROP INDEX idx_payment_salary_extrafields;
-ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);
-
-ALTER TABLE llx_salary ADD paye smallint default 1 NOT NULL;
-ALTER TABLE llx_salary ADD fk_account integer;
-
-ALTER TABLE llx_salary ALTER COLUMN paye SET DEFAULT 0;
-
-create table llx_payment_salary
+create table llx_payment_vat
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
- fk_salary integer,
+ fk_tva integer,
datec datetime, -- date de creation
tms timestamp,
datep datetime, -- payment date
@@ -174,3 +149,14 @@ create table llx_payment_salary
fk_user_modif integer -- last modification user
)ENGINE=innodb;
+
+ALTER TABLE llx_tva ADD COLUMN paye smallint default 1 NOT NULL;
+ALTER TABLE llx_tva ADD COLUMN fk_account integer;
+
+--INSERT INTO llx_payment_vat (fk_tva, datec, datep, amount, fk_typepaiement, num_paiement, note, fk_bank, fk_user_creat, fk_user_modif) SELECT rowid, NOW(), datep, amount, COALESCE(fk_typepayment, 0), num_payment, '', fk_bank, fk_user_creat, fk_user_modif FROM llx_tva;
+--UPDATE llx_bank_url as url INNER JOIN llx_tva tva ON tva.rowid = url.url_id SET url.type = 'vat', url.label = CONCAT('(', tva.label, ')') WHERE type = 'payment_vat';
+--INSERT INTO llx_bank_url (fk_bank, url_id, url, label, type) SELECT b.fk_bank, ptva.rowid, REPLACE(b.url, 'tva/card.php', 'payment_vat/card.php'), '(paiement)', 'payment_vat' FROM llx_bank_url b INNER JOIN llx_tva tva ON (tva.fk_bank = b.fk_bank) INNER JOIN llx_payment_vat ptva on (ptva.fk_bank = b.fk_bank) WHERE type = 'vat';
+
+--ALTER TABLE llx_tva DROP COLUMN fk_bank;
+
+ALTER TABLE llx_tva ALTER COLUMN paye SET DEFAULT 0;
diff --git a/htdocs/install/mysql/tables/llx_payment_vat.sql b/htdocs/install/mysql/tables/llx_payment_vat.sql
new file mode 100644
index 00000000000..4ebb5bb4af3
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_payment_vat.sql
@@ -0,0 +1,35 @@
+-- ===================================================================
+-- Copyright (C) 2004 Laurent Destailleur
+-- Copyright (C) 2021 Gauthier VERDOL
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see .
+--
+-- ===================================================================
+
+create table llx_payment_vat
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ fk_tva integer,
+ datec datetime, -- date de creation
+ tms timestamp,
+ datep datetime, -- payment date
+ amount double(24,8) DEFAULT 0,
+ fk_typepaiement integer NOT NULL,
+ num_paiement varchar(50),
+ note text,
+ fk_bank integer NOT NULL,
+ fk_user_creat integer, -- creation user
+ fk_user_modif integer -- last modification user
+
+)ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql
index 4459c7a1748..201114c7863 100644
--- a/htdocs/install/mysql/tables/llx_societe.sql
+++ b/htdocs/install/mysql/tables/llx_societe.sql
@@ -63,7 +63,7 @@ create table llx_societe
whatsapp varchar(255), -- deprecated
fk_effectif integer DEFAULT 0, --
- fk_typent integer DEFAULT 0, --
+ fk_typent integer DEFAULT NULL, -- type ent
fk_forme_juridique integer DEFAULT 0, -- juridical status
fk_currency varchar(3), -- default currency
siren varchar(128), -- IDProf1: depends on country (example: siren or RCS for france, ...)
diff --git a/htdocs/install/mysql/tables/llx_tva.sql b/htdocs/install/mysql/tables/llx_tva.sql
index 6cf97e6b4c6..938e6aa5626 100644
--- a/htdocs/install/mysql/tables/llx_tva.sql
+++ b/htdocs/install/mysql/tables/llx_tva.sql
@@ -30,7 +30,8 @@ create table llx_tva
label varchar(255),
entity integer DEFAULT 1 NOT NULL, -- multi company id
note text,
- fk_bank integer,
+ paye smallint default 0 NOT NULL,
+ fk_account integer,
fk_user_creat integer, -- utilisateur who create record
fk_user_modif integer, -- utilisateur who modify record
import_key varchar(14)
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 006dc0c823e..d4153280a69 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -494,6 +494,7 @@ Cash=Cash
Reported=Delayed
DisabledBecausePayments=Not possible since there are some payments
CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified paid
+CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid
CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid
ExpectedToPay=Expected payment
CantRemoveConciliatedPayment=Can't remove reconciled payment
@@ -501,6 +502,7 @@ PayedByThisPayment=Paid by this payment
ClosePaidInvoicesAutomatically=Classify automatically all standard, down payment or replacement invoices as "Paid" when payment is done entirely.
ClosePaidCreditNotesAutomatically=Classify automatically all credit notes as "Paid" when refund is done entirely.
ClosePaidContributionsAutomatically=Classify automatically all social or fiscal contributions as "Paid" when payment is done entirely.
+ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely.
ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely.
AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid".
ToMakePayment=Pay
diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang
index 6618beac53d..662b5b89411 100644
--- a/htdocs/langs/en_US/compta.lang
+++ b/htdocs/langs/en_US/compta.lang
@@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases
VATCollected=VAT collected
StatusToPay=To pay
SpecialExpensesArea=Area for all special payments
+VATExpensesArea=Area for all TVA payments
SocialContribution=Social or fiscal tax
SocialContributions=Social or fiscal taxes
SocialContributionsDeductibles=Deductible social or fiscal taxes
@@ -105,6 +106,8 @@ LT2PaymentES=IRPF Payment
LT2PaymentsES=IRPF Payments
VATPayment=Sales tax payment
VATPayments=Sales tax payments
+VATDeclarations=VAT declarations
+VATDeclaration=VAT declaration
VATRefund=Sales tax refund
NewVATPayment=New sales tax payment
NewLocalTaxPayment=New tax %s payment
@@ -135,12 +138,16 @@ NoWaitingChecks=No checks awaiting deposit.
DateChequeReceived=Check reception date
NbOfCheques=No. of checks
PaySocialContribution=Pay a social/fiscal tax
-ConfirmPaySalary=Pay a salary card
-ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid?
+PayVAT=Pay a VAT declaration
+PaySalary=Pay a salary card
+ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ?
+ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ?
ConfirmPaySalary=Are you sure you want to classify this salary card as paid?
DeleteSocialContribution=Delete a social or fiscal tax payment
+DeleteVAT=Delete a VAT declaration
DeleteSalary=Delete a salary card
-ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment?
+ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ?
+ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ?
ConfirmDeleteSalary=Are you sure you want to delete this salary?
ExportDataset_tax_1=Social and fiscal taxes and payments
CalcModeVATDebt=Mode %sVAT on commitment accounting%s.
@@ -240,6 +247,7 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi
ACCOUNTING_ACCOUNT_SUPPLIER=Accounting account used for vendor third parties
ACCOUNTING_ACCOUNT_SUPPLIER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated vendor accounting account on third party is not defined.
ConfirmCloneTax=Confirm the clone of a social/fiscal tax
+ConfirmCloneVAT=Confirm the clone of a VAT declaration
ConfirmCloneSalary=Confirm the clone of a salary
CloneTaxForNextMonth=Clone it for next month
SimpleReport=Simple report
@@ -259,7 +267,8 @@ AccountingAffectation=Accounting assignment
LastDayTaxIsRelatedTo=Last day of period the tax is related to
VATDue=Sale tax claimed
ClaimedForThisPeriod=Claimed for the period
-PaidDuringThisPeriod=Paid during this period
+PaidDuringThisPeriod=Paid for this period
+PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range
ByVatRate=By sale tax rate
TurnoverbyVatrate=Turnover invoiced by sale tax rate
TurnoverCollectedbyVatrate=Turnover collected by sale tax rate
diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php
index 5b297cb33a5..18ce5d12619 100644
--- a/htdocs/product/ajax/products.php
+++ b/htdocs/product/ajax/products.php
@@ -82,14 +82,10 @@ if (!empty($action) && $action == 'fetch' && !empty($id))
$found = false;
$price_level = 1;
- if ($socid > 0 && (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) {
+ if ($socid > 0 ) {
$thirdpartytemp = new Societe($db);
$thirdpartytemp->fetch($socid);
- if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
- $price_level = $thirdpartytemp->price_level;
- }
-
//Load translation description and label
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$newlang = $thirdpartytemp->default_lang;
@@ -104,6 +100,10 @@ if (!empty($action) && $action == 'fetch' && !empty($id))
$outlabel_trans = $object->label;
}
}
+
+ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
+ $price_level = $thirdpartytemp->price_level;
+ }
}
// Price by qty
@@ -191,7 +191,8 @@ if (!empty($action) && $action == 'fetch' && !empty($id))
'pricebasetype' => $outpricebasetype,
'tva_tx' => $outtva_tx,
'qty' => $outqty,
- 'discount' => $outdiscount);
+ 'discount' => $outdiscount,
+ 'array_option'=>$object->array_options);
}
echo json_encode($outjson);
diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php
index 30d31291a74..cb9bc100f79 100644
--- a/htdocs/reception/list.php
+++ b/htdocs/reception/list.php
@@ -447,7 +447,7 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
-if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
+if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_ref_rcp) $sql .= natural_search('e.ref', $search_ref_rcp);
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
if ($search_company) $sql .= natural_search('s.nom', $search_company);
@@ -656,7 +656,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked']))
{
print '';
- print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
+ print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print ' | ';
}
// Date delivery planned
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 78972bde66c..b471ca23ead 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -1497,7 +1497,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
// Type - Workforce/Staff
print '| '.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).' | browser->layout == 'phone' ? ' colspan="3"' : '').'>'."\n";
$sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
- print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
+ print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print ' | ';
if ($conf->browser->layout == 'phone') print '
';
@@ -2173,7 +2173,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
// Type - Workforce/Staff
print '
| '.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).' | ';
- print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
+ print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print ' | ';
if ($conf->browser->layout == 'phone') print '
';
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 57f9aa630f4..e62b17559ee 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -485,7 +485,7 @@ if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0";
if ($search_status != '' && $search_status >= 0) $sql .= natural_search("s.status", $search_status, 2);
if (!empty($conf->barcode->enabled) && $search_barcode) $sql .= natural_search("s.barcode", $search_barcode);
if ($search_prive_level && $search_prive_level != '-1') $sql .= natural_search("s.price_level", $search_prive_level, 2);
-if ($search_type_thirdparty && $search_type_thirdparty != '-1') $sql .= natural_search("s.fk_typent", $search_type_thirdparty, 2);
+if ($search_type_thirdparty && $search_type_thirdparty > 0) $sql .= natural_search("s.fk_typent", $search_type_thirdparty, 2);
if (!empty($search_staff) && $search_staff != '-1') $sql .= natural_search("s.fk_effectif", $search_staff, 2);
if ($search_level) $sql .= natural_search("s.fk_prospectlevel", join(',', $search_level), 3);
if ($search_parent_name) $sql .= natural_search("s2.nom", $search_parent_name);
@@ -582,7 +582,7 @@ if ($search_idprof5 != '') $param .= '&search_idprof5='.urlencode($search_idprof
if ($search_idprof6 != '') $param .= '&search_idprof6='.urlencode($search_idprof6);
if ($search_vat != '') $param .= '&search_vat='.urlencode($search_vat);
if ($search_prive_level != '') $param .= '&search_prive_level='.urlencode($search_prive_level);
-if ($search_type_thirdparty != '') $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
+if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
if ($search_type != '') $param .= '&search_type='.urlencode($search_type);
if (is_array($search_level) && count($search_level)) foreach ($search_level as $slevel) $param .= '&search_level[]='.urlencode($slevel);
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php
index 421ac40b447..9826c2a409d 100644
--- a/htdocs/supplier_proposal/list.php
+++ b/htdocs/supplier_proposal/list.php
@@ -294,7 +294,7 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
-if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
+if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_ref) $sql .= natural_search('sp.ref', $search_ref);
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
if ($search_login) $sql .= natural_search('u.login', $search_login);
@@ -395,6 +395,7 @@ if ($resql)
if ($socid > 0) $param .= '&socid='.urlencode($socid);
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
+ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@@ -518,7 +519,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked']))
{
print '| ';
- print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
+ print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print ' | ';
}
// Date
diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php
index 364723e2152..d6a2251b390 100644
--- a/htdocs/theme/eldy/btn.inc.php
+++ b/htdocs/theme/eldy/btn.inc.php
@@ -58,7 +58,9 @@ div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefuse
span.butAction, span.butActionDelete {
cursor: pointer;
}
-
+.paginationafterarrows .butAction {
+ font-size: 0.9em;
+}
.butAction {
background: var(--butactionbg);
color: #FFF !important;