Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/commande/card.php
	test/phpunit/ExportTest.php
This commit is contained in:
Laurent Destailleur 2021-02-02 16:17:53 +01:00
commit 2e7de1d137
7 changed files with 14 additions and 8 deletions

View File

@ -212,7 +212,6 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) {
print '</td>';
print "</tr>\n";
}
}
addSummaryTableLine(3, $num, $nbofloop, $total, "NoProposal");
@ -303,7 +302,6 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa
print '</td>';
print "</tr>\n";
}
}
addSummaryTableLine(3, $num, $nbofloop, $total, "NoProposal");
@ -395,7 +393,6 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
print '</td>';
print "</tr>\n";
}
}
addSummaryTableLine(3, $num, $nbofloop, $total, "NoProposal");
@ -487,7 +484,6 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU
print '</td>';
print "</tr>\n";
}
}
addSummaryTableLine(3, $num, $nbofloop, $total, "NoProposal");

View File

@ -610,7 +610,7 @@ if (empty($reshook))
$result = $object->set_remise($user, price2num(GETPOST('remise_percent'), 2));
} elseif ($action == 'setremiseabsolue' && $usercancreate) {
$result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU'));
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha')) {
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha')) {
// Define vat_rate
$vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0);
$vat_rate = str_replace('*', '', $vat_rate);

View File

@ -1821,6 +1821,8 @@ class Commande extends CommonOrder
$this->project = null; // Clear if another value was already set by fetch_projet
$this->statut = $obj->fk_statut;
$this->status = $obj->fk_statut;
$this->user_author_id = $obj->fk_user_author;
$this->user_valid = $obj->fk_user_valid;
$this->total_ht = $obj->total_ht;

View File

@ -1594,6 +1594,8 @@ class Facture extends CommonInvoice
$this->project = null; // Clear if another value was already set by fetch_projet
$this->statut = $obj->fk_statut;
$this->status = $obj->fk_statut;
$this->date_lim_reglement = $this->db->jdate($obj->dlr);
$this->mode_reglement_id = $obj->fk_mode_reglement;
$this->mode_reglement_code = $obj->mode_reglement_code;

View File

@ -222,6 +222,12 @@ abstract class CommonObject
*/
public $statut;
/**
* @var int The object's status
* @see setStatut()
*/
public $status;
/**
* @var string
* @see getFullAddress()

View File

@ -65,6 +65,7 @@ if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || !empty($conf->global->FA
} else {
print $langs->trans('VAT');
}
if (in_array($object->element, array('propal', 'commande', 'facture')) && $object->status == $object::STATUS_DRAFT)
{
global $mysoc;

View File

@ -279,15 +279,14 @@ class ExportTest extends PHPUnit\Framework\TestCase
$expectedresult=1;
$this->assertEquals($expectedresult, $result, 'Error in TSV export');
$model='excel2007new';
$model='excel2007';
// Build export file
/* ko on php 7.4 on travis (zip not available) */
print "Process build_file for model = ".$model."\n";
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql);
$expectedresult=1;
$this->assertEquals($expectedresult, $result, 'Error in Excel2007new export');
$this->assertEquals($expectedresult, $result, 'Error in Excel2007 export');
return true;
}