mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v21
This commit is contained in:
parent
01bda57d3a
commit
932b34e76e
|
|
@ -499,7 +499,7 @@ if ($nolinesbefore) {
|
|||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom linecoluseunit left">';
|
||||
print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, "units");
|
||||
print $form->selectUnits(empty($line->fk_unit) ? getDolGlobalInt('PRODUCT_USE_UNITS') : $line->fk_unit, "units");
|
||||
print '</td>';
|
||||
}
|
||||
$remise_percent = $buyer->remise_percent;
|
||||
|
|
|
|||
|
|
@ -4231,7 +4231,7 @@ class Societe extends CommonObject
|
|||
public function isACompany()
|
||||
{
|
||||
// Define if third party is treated as company (or not) when nature is unknown
|
||||
$isACompany = getDolGlobalInt('MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES');
|
||||
$isACompany = getDolGlobalInt('MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES', 1); // default if not set is 1 because it was like this in all past versions
|
||||
|
||||
// Now try to guess using different tips
|
||||
if (!empty($this->tva_intra)) {
|
||||
|
|
@ -4239,12 +4239,9 @@ class Societe extends CommonObject
|
|||
} elseif (!empty($this->idprof1) || !empty($this->idprof2) || !empty($this->idprof3) || !empty($this->idprof4) || !empty($this->idprof5) || !empty($this->idprof6)) {
|
||||
$isACompany = 1;
|
||||
} else {
|
||||
if (!getDolGlobalString('MAIN_CUSTOMERS_ARE_COMPANIES_EVEN_IF_SET_AS_INDIVIDUAL')) {
|
||||
// TODO Add a field is_a_company into dictionary
|
||||
if (preg_match('/^TE_PRIVATE/', $this->typent_code)) {
|
||||
if (!getDolGlobalString('MAIN_CUSTOMERS_ARE_COMPANIES_EVEN_IF_SET_AS_INDIVIDUAL')) { // never or rarely set
|
||||
if (preg_match('/^TE_PRIVATE/', $this->typent_code)) { // TODO Add a field is_a_company into dictionary
|
||||
$isACompany = 0;
|
||||
} else {
|
||||
$isACompany = 1;
|
||||
}
|
||||
} else {
|
||||
$isACompany = 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user