This commit is contained in:
Laurent Destailleur 2020-12-23 23:16:27 +01:00
parent 02daf09928
commit b66ec5bc64
7 changed files with 21 additions and 31 deletions

View File

@ -213,7 +213,7 @@ if ($object->id > 0)
$head = facture_prepare_head($object);
}
print dol_get_fiche_head($head, 'standingorders', $title, -1, 'bill');
print dol_get_fiche_head($head, 'standingorders', $title, -1, ($type == 'bank-transfer' ? 'supplier_invoice' : 'bill'));
// Invoice content
if ($type == 'bank-transfer') {

View File

@ -115,6 +115,8 @@ $permissiondellink = $usercancreate; // Used by the include of actions_dellink.i
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$error = 0;
/*
* Actions
@ -183,8 +185,7 @@ if (empty($reshook))
}
// Check parameters
if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change)
{
if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) {
$langs->load("stocks");
if (!$idwarehouse || $idwarehouse == -1)
{
@ -194,11 +195,9 @@ if (empty($reshook))
}
}
if (!$error)
{
if (!$error) {
$result = $object->validate($user, '', $idwarehouse);
if ($result < 0)
{
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
// Define output language
@ -220,8 +219,7 @@ if (empty($reshook))
}
}
}
} elseif ($action == 'confirm_delete' && $confirm == 'yes')
{
} elseif ($action == 'confirm_delete' && $confirm == 'yes') {
$object->fetch($id);
$object->fetch_thirdparty();
@ -280,15 +278,13 @@ if (empty($reshook))
} elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercancreate) {
$object->fetch($id);
$result = $object->set_paid($user);
if ($result < 0)
{
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
// Set supplier ref
if ($action == 'setref_supplier' && $usercancreate)
{
if ($action == 'setref_supplier' && $usercancreate) {
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
if ($object->update($user) < 0) {
@ -315,8 +311,7 @@ if (empty($reshook))
}
// payments conditions
if ($action == 'setconditions' && $usercancreate)
{
if ($action == 'setconditions' && $usercancreate) {
$object->fetch($id);
$object->cond_reglement_code = 0; // To clean property
$object->cond_reglement_id = 0; // To clean property
@ -1680,20 +1675,17 @@ if ($action == 'create')
$currency_code = $conf->currency;
$societe = '';
if (GETPOST('socid') > 0)
{
if (GETPOST('socid') > 0) {
$societe = new Societe($db);
$societe->fetch(GETPOST('socid', 'int'));
if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) $currency_code = $societe->multicurrency_code;
}
if (!empty($origin) && !empty($originid))
{
if (!empty($origin) && !empty($originid)) {
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
if ($element == 'project')
{
if ($element == 'project') {
$projectid = $originid;
$element = 'projet';
}
@ -2204,8 +2196,7 @@ if ($action == 'create')
// Show origin lines
if (is_object($objectsrc))
{
if (is_object($objectsrc)) {
print '<br>';
$title = $langs->trans('ProductsAndServices');
@ -2218,8 +2209,7 @@ if ($action == 'create')
print '</table>';
}
} else {
if ($id > 0 || !empty($ref))
{
if ($id > 0 || !empty($ref)) {
/* *************************************************************************** */
/* */
/* Fiche en mode visu ou edition */
@ -2275,7 +2265,7 @@ if ($action == 'create')
$head = facturefourn_prepare_head($object);
$titre = $langs->trans('SupplierInvoice');
print dol_get_fiche_head($head, 'card', $titre, -1, 'bill');
print dol_get_fiche_head($head, 'card', $titre, -1, 'supplier_invoice');
$formconfirm = '';

View File

@ -134,7 +134,7 @@ if ($id > 0 || !empty($ref))
$head = facturefourn_prepare_head($object);
print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'bill');
print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';

View File

@ -90,7 +90,7 @@ llxHeader('', $title, $helpurl);
if ($object->id > 0)
{
$head = facturefourn_prepare_head($object);
print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'bill');
print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
$totalpaye = $object->getSommePaiement();

View File

@ -51,7 +51,7 @@ $maxOpenCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->globa
llxHeader("", $langs->trans("SupplierInvoicesArea"), 'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores');
print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'bill');
print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'supplier_invoice');
print '<div class="fichecenter">';

View File

@ -65,7 +65,7 @@ $alreadypaid = $object->getSommePaiement();
$head = facturefourn_prepare_head($object);
$titre = $langs->trans('SupplierInvoice');
print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'bill');
print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';

View File

@ -82,7 +82,7 @@ if ($object->id > 0)
$head = facturefourn_prepare_head($object);
$titre = $langs->trans('SupplierInvoice');
print dol_get_fiche_head($head, 'note', $titre, -1, 'bill');
print dol_get_fiche_head($head, 'note', $titre, -1, 'supplier_invoice');
// Supplier invoice card