Skip to content

Commit

Permalink
Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 20, 2019
2 parents 0783248 + 554724a commit ee8e7d6
Show file tree
Hide file tree
Showing 23 changed files with 152 additions and 88 deletions.
5 changes: 3 additions & 2 deletions build/perl/virtualmin/dolibarr.pl
@@ -1,7 +1,7 @@
#----------------------------------------------------------------------------
# \file dolibarr.pl
# \brief Dolibarr script install for Virtualmin Pro
# \author (c)2009-2018 Regis Houssin <regis.houssin@inodbox.com>
# \author (c)2009-2019 Regis Houssin <regis.houssin@inodbox.com>
#----------------------------------------------------------------------------


Expand Down Expand Up @@ -30,7 +30,7 @@ sub script_dolibarr_author
# script_dolibarr_versions()
sub script_dolibarr_versions
{
return ( "9.0.0", "8.0.3", "7.0.4", "6.0.8", "5.0.7" );
return ( "10.0.0", "9.0.3", "8.0.5", "7.0.5", "6.0.8" );
}

sub script_dolibarr_release
Expand Down Expand Up @@ -390,6 +390,7 @@ sub script_dolibarr_check_latest
{
local ($ver) = @_;
local @vers = &osdn_package_versions("dolibarr",
$ver >= 10.0 ? "dolibarr\\-(10\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 7.0 ? "dolibarr\\-(7\\.0\\.[0-9\\.]+)\\.tgz" :
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/bookkeeping/listbyaccount.php
Expand Up @@ -348,7 +348,7 @@
$colspan = 9;
print "<tr>";
print '<td colspan="'.$colspan.'" style="font-weight:bold; border-bottom: 1pt solid black;">';
if (! empty($line->numero_compte) && $line->numero_compte != '-1') print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte);
if ($line->numero_compte != "" && $line->numero_compte != '-1') print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte);
else print '<span class="error">'.$langs->trans("Unknown").'</span>';
print '</td>';
print '</tr>';
Expand Down
30 changes: 15 additions & 15 deletions htdocs/accountancy/class/lettering.class.php
Expand Up @@ -67,11 +67,11 @@ public function letteringThirdparty($socid)
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu ON(bk.fk_doc = bu.fk_bank AND bu.type IN ('payment', 'payment_supplier') ) ";
$sql .= " WHERE ( ";
if (! empty($object->code_compta))
if ($object->code_compta != "")
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur))
if ($object->code_compta != "" && $object->code_compta_fournisseur != "")
$sql .= " OR ";
if (! empty($object->code_compta_fournisseur))
if ($object->code_compta_fournisseur != "")
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";

$sql .= " ) AND (bk.date_lettering ='' OR bk.date_lettering IS NULL) ";
Expand Down Expand Up @@ -99,13 +99,13 @@ public function letteringThirdparty($socid)
$sql .= " AND facf.entity = ".$conf->entity;
$sql .= " AND code_journal IN (SELECT code FROM " . MAIN_DB_PREFIX . "accounting_journal WHERE nature=4 AND entity=".$conf->entity.") ";
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
if ($object->code_compta != "") {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
if ($object->code_compta != "" && $object->code_compta_fournisseur != "") {
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
if ($object->code_compta_fournisseur != "") {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= " ) ";
Expand All @@ -127,13 +127,13 @@ public function letteringThirdparty($socid)
$sql .= " WHERE bk.code_journal IN (SELECT code FROM " . MAIN_DB_PREFIX . "accounting_journal WHERE nature=3 AND entity=".$conf->entity.") ";
$sql .= " AND facf.entity = ".$conf->entity;
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
if ($object->code_compta != "") {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
if ($object->code_compta != "" && $object->code_compta_fournisseur != "") {
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
if ($object->code_compta_fournisseur != "") {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= ") ";
Expand All @@ -159,13 +159,13 @@ public function letteringThirdparty($socid)
$sql .= " AND bk.code_journal IN (SELECT code FROM " . MAIN_DB_PREFIX . "accounting_journal WHERE nature=4 AND entity=".$conf->entity.") ";
$sql .= " AND fac.entity IN (".getEntity('invoice', 0).")";// We don't share object for accountancy
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
if ($object->code_compta != "") {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
if ($object->code_compta != "" && $object->code_compta_fournisseur != "") {
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
if ($object->code_compta_fournisseur != "") {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= " ) ";
Expand All @@ -187,13 +187,13 @@ public function letteringThirdparty($socid)
$sql .= " WHERE code_journal IN (SELECT code FROM " . MAIN_DB_PREFIX . "accounting_journal WHERE nature=2 AND entity=".$conf->entity.") ";
$sql .= " AND fac.entity IN (".getEntity('invoice', 0).")";// We don't share object for accountancy
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
if ($object->code_compta != "") {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
if ($object->code_compta != "" && $object->code_compta_fournisseur != "") {
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
if ($object->code_compta_fournisseur != "") {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= " ) ";
Expand Down
14 changes: 7 additions & 7 deletions htdocs/accountancy/journal/bankjournal.php
Expand Up @@ -171,8 +171,8 @@
//print $sql;

// Variables
$account_supplier = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : 'NotDefined'); // NotDefined is a reserved word
$account_customer = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : 'NotDefined'); // NotDefined is a reserved word
$account_supplier = (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER != "") ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : 'NotDefined'); // NotDefined is a reserved word
$account_customer = ($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER != "") ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : 'NotDefined'); // NotDefined is a reserved word
$account_employee = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : 'NotDefined'); // NotDefined is a reserved word
$account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : 'NotDefined'); // NotDefined is a reserved word
$account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : 'NotDefined'); // NotDefined is a reserved word
Expand Down Expand Up @@ -218,7 +218,7 @@
// Set accountancy code for thirdparty
$compta_soc = 'NotDefined';
if ($lineisapurchase > 0)
$compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $account_supplier);
$compta_soc = (($obj->code_compta_fournisseur != "") ? $obj->code_compta_fournisseur : $account_supplier);
if ($lineisasale > 0)
$compta_soc = (! empty($obj->code_compta) ? $obj->code_compta : $account_customer);

Expand Down Expand Up @@ -938,8 +938,8 @@


// Button to write into Ledger
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1'
|| empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1'
if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1'
|| ($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1'
|| empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
print '<br>'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
Expand All @@ -950,8 +950,8 @@

if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';

if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1'
|| empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1'
|| ($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
print '<input type="button" class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
else {
Expand Down
14 changes: 7 additions & 7 deletions htdocs/accountancy/journal/expensereportsjournal.php
Expand Up @@ -444,10 +444,10 @@

foreach ($taber as $key => $val) {
$date = dol_print_date($val["date"], 'day');

$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];

// Fees
foreach ($tabht[$key] as $k => $mt) {
$accountingaccount = new AccountingAccount($db);
Expand All @@ -474,7 +474,7 @@
print "\n";
}
}

// Third party
foreach ($tabttc[$key] as $k => $mt) {
print '"' . $date . '"' . $sep;
Expand Down Expand Up @@ -585,7 +585,7 @@ function writebookkeeping() {
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("FeeAccountNotDefined").'</span>';
}
Expand Down Expand Up @@ -615,7 +615,7 @@ function writebookkeeping() {
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForUsersNotDefined").'</span>';
}
Expand All @@ -624,7 +624,7 @@ function writebookkeeping() {
// Subledger account
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("UserAccountNotDefined").'</span>';
}
Expand Down Expand Up @@ -652,7 +652,7 @@ function writebookkeeping() {
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/journal/purchasesjournal.php
Expand Up @@ -749,7 +749,7 @@
}
print '<div class="tabsAction tabsActionNoBottom">';
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
if (empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
if (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
print '<input type="button" class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
else {
Expand Down
14 changes: 7 additions & 7 deletions htdocs/accountancy/journal/sellsjournal.php
Expand Up @@ -146,7 +146,7 @@
$num = $db->num_rows($result);

// Variables
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER)) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : 'NotDefined';
$cptcli = (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER != "")) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : 'NotDefined';
$cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT : 'NotDefined';

$i = 0;
Expand Down Expand Up @@ -679,14 +679,14 @@
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);

// Button to write into Ledger
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
print '<br>';
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
if (! empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
print '<input type="button" class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
else {
Expand Down Expand Up @@ -813,7 +813,7 @@ function writebookkeeping() {
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
}
Expand All @@ -822,7 +822,7 @@ function writebookkeeping() {
// Subledger account
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
Expand All @@ -849,7 +849,7 @@ function writebookkeeping() {
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ProductNotDefined").'</span>';
}
Expand Down Expand Up @@ -884,7 +884,7 @@ function writebookkeeping() {
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Sale").')'.'</span>';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/categories/class/api_categories.class.php
Expand Up @@ -86,7 +86,7 @@ public function get($id)
throw new RestException(404, 'category not found');
}

if ( ! DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
if ( ! DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}

Expand Down
15 changes: 8 additions & 7 deletions htdocs/comm/action/peruser.php
Expand Up @@ -1186,33 +1186,34 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
}
}

$ids1='';$ids2='';
if (count($cases1[$h]) && array_keys($cases1[$h])) $ids1=join(',', array_keys($cases1[$h]));
if (count($cases2[$h]) && array_keys($cases2[$h])) $ids2=join(',', array_keys($cases2[$h]));
$ids1='';
$ids2='';
if (is_array($cases1[$h]) && count($cases1[$h]) && array_keys($cases1[$h])) $ids1=join(',', array_keys($cases1[$h]));
if (is_array($cases2[$h]) && count($cases2[$h]) && array_keys($cases2[$h])) $ids2=join(',', array_keys($cases2[$h]));

if ($h == $begin_h) echo '<td class="'.$style.'_peruserleft cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'">';
else echo '<td class="'.$style.' cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'">';
if (count($cases1[$h]) == 1) // only 1 event
if (is_array($cases1[$h]) && count($cases1[$h]) == 1) // only 1 event
{
$output = array_slice($cases1[$h], 0, 1);
$title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:'');
if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];
if ($output[0]['color']) $color1 = $output[0]['color'];
}
elseif (count($cases1[$h]) > 1)
elseif (is_array($cases1[$h]) && count($cases1[$h]) > 1)
{
$title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:'');
$color1='222222';
}

if (count($cases2[$h]) == 1) // only 1 event
if (is_array($cases2[$h]) && count($cases2[$h]) == 1) // only 1 event
{
$output = array_slice($cases2[$h], 0, 1);
$title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:'');
if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];
if ($output[0]['color']) $color2 = $output[0]['color'];
}
elseif (count($cases2[$h]) > 1)
elseif (is_array($cases2[$h]) && count($cases2[$h]) > 1)
{
$title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:'');
$color2='222222';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/journal/purchasesjournal.php
Expand Up @@ -123,7 +123,7 @@
{
$num = $db->num_rows($result);
// les variables
$cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)?$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER:$langs->trans("CodeNotDef"));
$cptfour = (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER != "")?$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER:$langs->trans("CodeNotDef"));
$cpttva = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)?$conf->global->ACCOUNTING_VAT_BUY_ACCOUNT:$langs->trans("CodeNotDef"));

$tabfac = array();
Expand All @@ -139,7 +139,7 @@
{
$obj = $db->fetch_object($result);
// contrôles
$compta_soc = (! empty($obj->code_compta_fournisseur)?$obj->code_compta_fournisseur:$cptfour);
$compta_soc = (($obj->code_compta_fournisseur != "")?$obj->code_compta_fournisseur:$cptfour);
$compta_prod = $obj->accountancy_code_buy;
if (empty($compta_prod))
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/journal/sellsjournal.php
Expand Up @@ -146,7 +146,7 @@
{
$obj = $db->fetch_object($result);
// les variables
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER)?$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER:$langs->trans("CodeNotDef"));
$cptcli = (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER != "")?$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER:$langs->trans("CodeNotDef"));
$compta_soc = (! empty($obj->code_compta)?$obj->code_compta:$cptcli);
$compta_prod = $obj->accountancy_code_sell;
if (empty($compta_prod))
Expand Down

0 comments on commit ee8e7d6

Please sign in to comment.