Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
Conflicts: htdocs/product/price.php
This commit is contained in:
commit
591059847e
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
@ -604,7 +604,7 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td>".$expensereportstatic->getNomUrl(1)."</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
|
||||
$accountoshow = length_accountg($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
|
||||
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("MainAccountForUsersNotDefined").'</span>';
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
@ -621,7 +621,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"'.$val["refsologest"].'"'.$sep;
|
||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER.'"'.$sep;
|
||||
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER).'"'.$sep;
|
||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("Thirdparty").'"'.$sep;
|
||||
@ -687,9 +687,9 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"'.$date.'"'.$sep;
|
||||
print '"'.$val["refsologest"].'"'.$sep;
|
||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("VAT").' NPR"'.$sep;
|
||||
print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep;
|
||||
@ -861,7 +861,7 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
|
||||
$accountoshow = length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
|
||||
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("MainAccountForSuppliersNotDefined").'</span>';
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
@ -580,7 +580,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"'.$val["ref"].'"'.$sep;
|
||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER.'"'.$sep;
|
||||
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER).'"'.$sep;
|
||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$invoicestatic->ref.' - '.$langs->trans("Thirdparty").'"'.$sep;
|
||||
@ -799,7 +799,7 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
|
||||
$accountoshow = length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
|
||||
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
|
||||
|
||||
@ -311,8 +311,8 @@ if (empty($reshook))
|
||||
//var_dump($array_of_total_ht_per_vat_rate);exit;
|
||||
foreach ($array_of_total_ht_per_vat_rate as $vatrate => $tmpvalue)
|
||||
{
|
||||
$tmp_total_ht = $array_of_total_ht_per_vat_rate[$vatrate];
|
||||
$tmp_total_ht_devise = $array_of_total_ht_devise_per_vat_rate[$vatrate];
|
||||
$tmp_total_ht = price2num($array_of_total_ht_per_vat_rate[$vatrate]);
|
||||
$tmp_total_ht_devise = price2num($array_of_total_ht_devise_per_vat_rate[$vatrate]);
|
||||
|
||||
if (($tmp_total_ht < 0 || $tmp_total_ht_devise < 0) && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES))
|
||||
{
|
||||
|
||||
@ -100,7 +100,8 @@ class FormMargin
|
||||
|
||||
$pv = $line->total_ht;
|
||||
$pa_ht = ($pv < 0 ? -$line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
|
||||
if ($object->element == 'facture' && $object->type == $object::TYPE_SITUATION) {
|
||||
if (($object->element == 'facture' && $object->type == $object::TYPE_SITUATION)
|
||||
|| ($object->element == 'facture' && $object->type == $object::TYPE_CREDIT_NOTE && $conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE && $object->situation_counter > 0)) {
|
||||
$pa = $line->qty * $pa_ht * ($line->situation_percent / 100);
|
||||
} else {
|
||||
$pa = $line->qty * $pa_ht;
|
||||
|
||||
@ -1600,8 +1600,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul
|
||||
} elseif ($i > 0) $candelete = 1;
|
||||
|
||||
print '<td class="right">';
|
||||
if ($candelete)
|
||||
{
|
||||
if ($candelete || ($db->jdate($objp->dp) >= dol_now())) { // Test on date is to be able to delete a corrupted record with a date in future
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id.'&lineid='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user