clean indent
This commit is contained in:
parent
5006001753
commit
b2b057e9b5
@ -790,12 +790,9 @@ if ($object->id > 0)
|
|||||||
if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->creer)
|
if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->creer)
|
||||||
{
|
{
|
||||||
$langs->load("supplier_proposal");
|
$langs->load("supplier_proposal");
|
||||||
if ($object->status == 1)
|
if ($object->status == 1) {
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddSupplierProposal").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddSupplierProposal").'</a>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddSupplierProposal").'</a>';
|
print '<a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddSupplierProposal").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -803,12 +800,9 @@ if ($object->id > 0)
|
|||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
if ($object->status == 1)
|
if ($object->status == 1) {
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddOrder").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddOrder").'</a>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddOrder").'</a>';
|
print '<a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddOrder").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -816,12 +810,9 @@ if ($object->id > 0)
|
|||||||
if ($user->rights->fournisseur->facture->creer)
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
if ($object->status == 1)
|
if ($object->status == 1) {
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddBill").'</a>';
|
print '<a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddBill").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -830,8 +821,9 @@ if ($object->id > 0)
|
|||||||
{
|
{
|
||||||
if (! empty($orders2invoice) && $orders2invoice > 0)
|
if (! empty($orders2invoice) && $orders2invoice > 0)
|
||||||
{
|
{
|
||||||
if ($object->status == 1) // Company is open
|
if ($object->status == 1)
|
||||||
{
|
{
|
||||||
|
// Company is open
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/orderstoinvoice.php?socid='.$object->id.'">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/orderstoinvoice.php?socid='.$object->id.'">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -1272,7 +1272,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
{
|
{
|
||||||
$this->special_code = $this->lines[$i]->special_code; // TODO : remove this in 9.0 and add special_code param to addline()
|
$this->special_code = $this->lines[$i]->special_code; // TODO : remove this in 9.0 and add special_code param to addline()
|
||||||
|
|
||||||
$result = $this->addline( // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
// This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
||||||
|
$result = $this->addline(
|
||||||
$this->lines[$i]->desc,
|
$this->lines[$i]->desc,
|
||||||
$this->lines[$i]->subprice,
|
$this->lines[$i]->subprice,
|
||||||
$this->lines[$i]->qty,
|
$this->lines[$i]->qty,
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2012-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Ion Agorria <ion@agorria.com>
|
* Copyright (C) 2014 Ion Agorria <ion@agorria.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -647,8 +647,9 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// Define info_bits
|
// Define info_bits
|
||||||
$info_bits = 0;
|
$info_bits = 0;
|
||||||
if (preg_match('/\*/', $vat_rate))
|
if (preg_match('/\*/', $vat_rate)) {
|
||||||
$info_bits |= 0x01;
|
$info_bits |= 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
// Define vat_rate
|
// Define vat_rate
|
||||||
$vat_rate = str_replace('*', '', $vat_rate);
|
$vat_rate = str_replace('*', '', $vat_rate);
|
||||||
|
|||||||
@ -157,9 +157,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -407,9 +407,10 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -126,9 +126,10 @@ if ($object->id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -122,9 +122,10 @@ if (! empty($conf->projet->enabled))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -103,9 +103,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -23,11 +23,9 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -37,7 +35,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
|||||||
|
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0;
|
||||||
|
$ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$ilink++;
|
$ilink++;
|
||||||
@ -74,6 +73,5 @@ if (count($linkedObjectBlock) > 1)
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -308,10 +308,12 @@ if (empty($reshook))
|
|||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$newlang = '';
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09'))
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
|
||||||
$newlang = GETPOST('lang_id', 'aZ09');
|
$newlang = GETPOST('lang_id', 'aZ09');
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
}
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
|
||||||
$newlang = $object->thirdparty->default_lang;
|
$newlang = $object->thirdparty->default_lang;
|
||||||
|
}
|
||||||
if (! empty($newlang)) {
|
if (! empty($newlang)) {
|
||||||
$outputlangs = new Translate("", $conf);
|
$outputlangs = new Translate("", $conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
@ -2376,8 +2378,9 @@ else
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->fournisseur->facture->creer)
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -1111,8 +1111,7 @@ if ($resql)
|
|||||||
|| isset($totalarray['totalttcfield'])
|
|| isset($totalarray['totalttcfield'])
|
||||||
|| isset($totalarray['totalamfield'])
|
|| isset($totalarray['totalamfield'])
|
||||||
|| isset($totalarray['totalrtpfield'])
|
|| isset($totalarray['totalrtpfield'])
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $totalarray['nbfield'])
|
while ($i < $totalarray['nbfield'])
|
||||||
|
|||||||
@ -102,9 +102,10 @@ if ($object->id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -25,11 +25,9 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -56,8 +54,9 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
if ($user->rights->fournisseur->facture->lire) {
|
if ($user->rights->fournisseur->facture->lire) {
|
||||||
$sign = 1;
|
$sign = 1;
|
||||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = -1;
|
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = -1;
|
||||||
if ($objectlink->statut != 3) // If not abandonned
|
if ($objectlink->statut != 3)
|
||||||
{
|
{
|
||||||
|
// If not abandonned
|
||||||
$total = $total + $sign * $objectlink->total_ht;
|
$total = $total + $sign * $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
}
|
}
|
||||||
@ -85,6 +84,5 @@ if (count($linkedObjectBlock) > 1)
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -1744,7 +1744,8 @@ class Holiday extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Si faux donc return array
|
{
|
||||||
|
// Si faux donc return array
|
||||||
// List for Dolibarr users
|
// List for Dolibarr users
|
||||||
if ($type)
|
if ($type)
|
||||||
{
|
{
|
||||||
@ -1757,9 +1758,9 @@ class Holiday extends CommonObject
|
|||||||
$sql.= " WHERE (ug.fk_user = u.rowid";
|
$sql.= " WHERE (ug.fk_user = u.rowid";
|
||||||
$sql.= " AND ug.entity = ".$conf->entity.")";
|
$sql.= " AND ug.entity = ".$conf->entity.")";
|
||||||
$sql.= " OR u.admin = 1";
|
$sql.= " OR u.admin = 1";
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
|
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
|
||||||
|
}
|
||||||
|
|
||||||
$sql.= " AND u.statut > 0";
|
$sql.= " AND u.statut > 0";
|
||||||
if ($filters) $sql.=$filters;
|
if ($filters) $sql.=$filters;
|
||||||
@ -1793,9 +1794,7 @@ class Holiday extends CommonObject
|
|||||||
}
|
}
|
||||||
// Retoune le tableau des utilisateurs
|
// Retoune le tableau des utilisateurs
|
||||||
return $tab_result;
|
return $tab_result;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Erreur SQL
|
// Erreur SQL
|
||||||
$this->errors[]="Error ".$this->db->lasterror();
|
$this->errors[]="Error ".$this->db->lasterror();
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -1962,7 +1962,8 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
|
|||||||
|
|
||||||
$height='24px';
|
$height='24px';
|
||||||
|
|
||||||
if ($key == 'none') {//stop multiple duplicate ids with no number
|
if ($key == 'none') {
|
||||||
|
//stop multiple duplicate ids with no number
|
||||||
print "\n\n<!-- Box_no-key start-->\n";
|
print "\n\n<!-- Box_no-key start-->\n";
|
||||||
print '<div class="box boximport" style="padding:0;">' . "\n";
|
print '<div class="box boximport" style="padding:0;">' . "\n";
|
||||||
print '<table summary="boxtable_no-key" width="100%" class="nobordernopadding">' . "\n";
|
print '<table summary="boxtable_no-key" width="100%" class="nobordernopadding">' . "\n";
|
||||||
|
|||||||
@ -128,9 +128,11 @@ if (! empty($force_install_message))
|
|||||||
id="main_dir"
|
id="main_dir"
|
||||||
name="main_dir"
|
name="main_dir"
|
||||||
value="<?php print $dolibarr_main_document_root ?>"
|
value="<?php print $dolibarr_main_document_root ?>"
|
||||||
<?php if (!empty($force_install_noedit)) {
|
<?php
|
||||||
|
if (!empty($force_install_noedit)) {
|
||||||
print ' disabled';
|
print ' disabled';
|
||||||
} ?>
|
}
|
||||||
|
?>
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php
|
<td class="comment"><?php
|
||||||
@ -193,7 +195,8 @@ if (! empty($force_install_message))
|
|||||||
value="<?php print $dolibarr_main_url_root; ?> "
|
value="<?php print $dolibarr_main_url_root; ?> "
|
||||||
<?php if (!empty($force_install_noedit)) {
|
<?php if (!empty($force_install_noedit)) {
|
||||||
print ' disabled';
|
print ' disabled';
|
||||||
} ?>
|
}
|
||||||
|
?>
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php print $langs->trans("Examples").":<br>"; ?>
|
<td class="comment"><?php print $langs->trans("Examples").":<br>"; ?>
|
||||||
@ -214,12 +217,8 @@ if (! empty($force_install_message))
|
|||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="main_force_https"
|
id="main_force_https"
|
||||||
name="main_force_https"
|
name="main_force_https"
|
||||||
<?php if (!empty($force_install_mainforcehttps)) {
|
<?php if (!empty($force_install_mainforcehttps)) { print ' checked'; } ?>
|
||||||
print ' checked';
|
<?php if ($force_install_noedit == 2 && $force_install_mainforcehttps !== null) { print ' disabled'; } ?>
|
||||||
} ?>
|
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_mainforcehttps !== null) {
|
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("CheckToForceHttps"); ?>
|
<td class="comment"><?php echo $langs->trans("CheckToForceHttps"); ?>
|
||||||
@ -245,9 +244,7 @@ if (! empty($force_install_message))
|
|||||||
id="db_name"
|
id="db_name"
|
||||||
name="db_name"
|
name="db_name"
|
||||||
value="<?php echo (!empty($dolibarr_main_db_name)) ? $dolibarr_main_db_name : ($force_install_database ? $force_install_database : 'dolibarr'); ?>"
|
value="<?php echo (!empty($dolibarr_main_db_name)) ? $dolibarr_main_db_name : ($force_install_database ? $force_install_database : 'dolibarr'); ?>"
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_database !== null) {
|
<?php if ($force_install_noedit == 2 && $force_install_database !== null) { print ' disabled'; } ?>
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("DatabaseName"); ?></td>
|
<td class="comment"><?php echo $langs->trans("DatabaseName"); ?></td>
|
||||||
@ -324,9 +321,7 @@ if (! empty($force_install_message))
|
|||||||
?>
|
?>
|
||||||
<select id="db_type"
|
<select id="db_type"
|
||||||
name="db_type"
|
name="db_type"
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_type !== null) {
|
<?php if ($force_install_noedit == 2 && $force_install_type !== null) { print ' disabled'; } ?>
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
<?php print $option; ?>
|
<?php print $option; ?>
|
||||||
</select>
|
</select>
|
||||||
@ -343,9 +338,7 @@ if (! empty($force_install_message))
|
|||||||
id="db_host"
|
id="db_host"
|
||||||
name="db_host"
|
name="db_host"
|
||||||
value="<?php print (!empty($force_install_dbserver) ? $force_install_dbserver : (!empty($dolibarr_main_db_host) ? $dolibarr_main_db_host : 'localhost')); ?>"
|
value="<?php print (!empty($force_install_dbserver) ? $force_install_dbserver : (!empty($dolibarr_main_db_host) ? $dolibarr_main_db_host : 'localhost')); ?>"
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_dbserver !== null) {
|
<?php if ($force_install_noedit == 2 && $force_install_dbserver !== null) { print ' disabled'; } ?>
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("ServerAddressDescription"); ?>
|
<td class="comment"><?php echo $langs->trans("ServerAddressDescription"); ?>
|
||||||
@ -360,9 +353,7 @@ if (! empty($force_install_message))
|
|||||||
name="db_port"
|
name="db_port"
|
||||||
id="db_port"
|
id="db_port"
|
||||||
value="<?php print (!empty($force_install_port)) ? $force_install_port : $dolibarr_main_db_port; ?>"
|
value="<?php print (!empty($force_install_port)) ? $force_install_port : $dolibarr_main_db_port; ?>"
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_port !== null) {
|
<?php if ($force_install_noedit == 2 && $force_install_port !== null) { print ' disabled'; } ?>
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("ServerPortDescription"); ?>
|
<td class="comment"><?php echo $langs->trans("ServerPortDescription"); ?>
|
||||||
@ -377,9 +368,7 @@ if (! empty($force_install_message))
|
|||||||
id="db_prefix"
|
id="db_prefix"
|
||||||
name="db_prefix"
|
name="db_prefix"
|
||||||
value="<?php echo(!empty($force_install_prefix) ? $force_install_prefix : (!empty($dolibarr_main_db_prefix) ? $dolibarr_main_db_prefix : 'llx_')); ?>"
|
value="<?php echo(!empty($force_install_prefix) ? $force_install_prefix : (!empty($dolibarr_main_db_prefix) ? $dolibarr_main_db_prefix : 'llx_')); ?>"
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_prefix !== null) {
|
<?php if ($force_install_noedit == 2 && $force_install_prefix !== null) { print ' disabled'; } ?>
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("DatabasePrefixDescription"); ?></td>
|
<td class="comment"><?php echo $langs->trans("DatabasePrefixDescription"); ?></td>
|
||||||
@ -391,12 +380,8 @@ if (! empty($force_install_message))
|
|||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="db_create_database"
|
id="db_create_database"
|
||||||
name="db_create_database"
|
name="db_create_database"
|
||||||
<?php if ($force_install_createdatabase) {
|
<?php if ($force_install_createdatabase) { print ' checked'; } ?>
|
||||||
print ' checked';
|
<?php if ($force_install_noedit == 2 && $force_install_createdatabase !== null) { print ' disabled'; } ?>
|
||||||
} ?>
|
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_createdatabase !== null) {
|
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("CheckToCreateDatabase"); ?>
|
<td class="comment"><?php echo $langs->trans("CheckToCreateDatabase"); ?>
|
||||||
@ -410,9 +395,7 @@ if (! empty($force_install_message))
|
|||||||
id="db_user"
|
id="db_user"
|
||||||
name="db_user"
|
name="db_user"
|
||||||
value="<?php print (!empty($force_install_databaselogin)) ? $force_install_databaselogin : $dolibarr_main_db_user; ?>"
|
value="<?php print (!empty($force_install_databaselogin)) ? $force_install_databaselogin : $dolibarr_main_db_user; ?>"
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_databaselogin !== null) {
|
<?php if ($force_install_noedit == 2 && $force_install_databaselogin !== null) { print ' disabled'; } ?>
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("AdminLogin"); ?></td>
|
<td class="comment"><?php echo $langs->trans("AdminLogin"); ?></td>
|
||||||
@ -424,7 +407,8 @@ if (! empty($force_install_message))
|
|||||||
<input type="password"
|
<input type="password"
|
||||||
id="db_pass" autocomplete="off"
|
id="db_pass" autocomplete="off"
|
||||||
name="db_pass"
|
name="db_pass"
|
||||||
value="<?php
|
value="
|
||||||
|
<?php
|
||||||
// If $force_install_databasepass is on, we don't want to set password, we just show '***'. Real value will be extracted from the forced install file at step1.
|
// If $force_install_databasepass is on, we don't want to set password, we just show '***'. Real value will be extracted from the forced install file at step1.
|
||||||
$autofill = ((!empty($_SESSION['dol_save_pass'])) ? $_SESSION['dol_save_pass'] : str_pad('', strlen($force_install_databasepass), '*'));
|
$autofill = ((!empty($_SESSION['dol_save_pass'])) ? $_SESSION['dol_save_pass'] : str_pad('', strlen($force_install_databasepass), '*'));
|
||||||
if (!empty($dolibarr_main_prod)) {
|
if (!empty($dolibarr_main_prod)) {
|
||||||
@ -432,9 +416,7 @@ if (! empty($force_install_message))
|
|||||||
}
|
}
|
||||||
print dol_escape_htmltag($autofill);
|
print dol_escape_htmltag($autofill);
|
||||||
?>"
|
?>"
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_databasepass !== null) {
|
<?php if ($force_install_noedit == 2 && $force_install_databasepass !== null) { print ' disabled'; } ?>
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("AdminPassword"); ?></td>
|
<td class="comment"><?php echo $langs->trans("AdminPassword"); ?></td>
|
||||||
@ -446,12 +428,8 @@ if (! empty($force_install_message))
|
|||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="db_create_user"
|
id="db_create_user"
|
||||||
name="db_create_user"
|
name="db_create_user"
|
||||||
<?php if (!empty($force_install_createuser)) {
|
<?php if (!empty($force_install_createuser)) { print ' checked'; } ?>
|
||||||
print ' checked';
|
<?php if ($force_install_noedit == 2 && $force_install_createuser !== null) { print ' disabled'; } ?>
|
||||||
} ?>
|
|
||||||
<?php if ($force_install_noedit == 2 && $force_install_createuser !== null) {
|
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("CheckToCreateUser"); ?>
|
<td class="comment"><?php echo $langs->trans("CheckToCreateUser"); ?>
|
||||||
@ -478,9 +456,7 @@ if (! empty($force_install_message))
|
|||||||
name="db_user_root"
|
name="db_user_root"
|
||||||
class="needroot"
|
class="needroot"
|
||||||
value="<?php print (!empty($force_install_databaserootlogin)) ? $force_install_databaserootlogin : @$db_user_root; ?>"
|
value="<?php print (!empty($force_install_databaserootlogin)) ? $force_install_databaserootlogin : @$db_user_root; ?>"
|
||||||
<?php if ($force_install_noedit > 0 && ! empty($force_install_databaserootlogin)) {
|
<?php if ($force_install_noedit > 0 && ! empty($force_install_databaserootlogin)) { print ' disabled'; } ?>
|
||||||
print ' disabled';
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("DatabaseRootLoginDescription"); ?>
|
<td class="comment"><?php echo $langs->trans("DatabaseRootLoginDescription"); ?>
|
||||||
@ -516,9 +492,7 @@ if (! empty($force_install_message))
|
|||||||
} // Do not autofill password for remote access
|
} // Do not autofill password for remote access
|
||||||
print dol_escape_htmltag($autofill);
|
print dol_escape_htmltag($autofill);
|
||||||
?>"
|
?>"
|
||||||
<?php if ($force_install_noedit > 0 && ! empty($force_install_databaserootpass)) {
|
<?php if ($force_install_noedit > 0 && ! empty($force_install_databaserootpass)) { print ' disabled'; // May be removed by javascript } ?>
|
||||||
print ' disabled'; // May be removed by javascript
|
|
||||||
} ?>
|
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("KeepEmptyIfNoPassword"); ?>
|
<td class="comment"><?php echo $langs->trans("KeepEmptyIfNoPassword"); ?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user