Merge remote-tracking branch 'upstream/develop' into api_bank_account
This commit is contained in:
commit
554fbcb577
@ -46,7 +46,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("orders", 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks'));
|
$langs->loadLangs(array("orders", 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks', 'products'));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$massaction = GETPOST('massaction', 'alpha');
|
$massaction = GETPOST('massaction', 'alpha');
|
||||||
|
|||||||
@ -549,16 +549,17 @@ if (!empty($conf->multicompany->enabled) && is_object($mc))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$listofchoices = array(
|
$listofchoices = array(
|
||||||
'selectinvoices'=>array('label'=>'Invoices', 'lang'=>'bills'),
|
'selectinvoices'=>array('label'=>'Invoices', 'lang'=>'bills', 'enabled' => !empty($conf->facture->enabled)),
|
||||||
'selectsupplierinvoices'=>array('label'=>'BillsSuppliers', 'lang'=>'bills'),
|
'selectsupplierinvoices'=>array('label'=>'BillsSuppliers', 'lang'=>'bills', 'enabled' => !empty($conf->supplier_invoice->enabled)),
|
||||||
'selectexpensereports'=>array('label'=>'ExpenseReports', 'lang'=>'trips'),
|
'selectexpensereports'=>array('label'=>'ExpenseReports', 'lang'=>'trips', 'enabled' => !empty($conf->expensereport->enabled)),
|
||||||
'selectdonations'=>array('label'=>'Donations', 'lang'=>'donation'),
|
'selectdonations'=>array('label'=>'Donations', 'lang'=>'donation', 'enabled' => !empty($conf->don->enabled)),
|
||||||
'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'lang'=>'salaries'),
|
'selectsocialcontributions'=>array('label'=>'SocialContributions', 'enabled' => !empty($conf->tax->enabled)),
|
||||||
'selectsocialcontributions'=>array('label'=>'SocialContributions'),
|
'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'lang'=>'salaries', 'enabled' => !empty($conf->salaries->enabled)),
|
||||||
'selectvariouspayment'=>array('label'=>'VariousPayment'),
|
'selectvariouspayment'=>array('label'=>'VariousPayment', 'enabled' => !empty($conf->banque->enabled)),
|
||||||
'selectloanspayment'=>array('label'=>'PaymentLoan'),
|
'selectloanspayment'=>array('label'=>'PaymentLoan', 'enabled' => !empty($conf->loan->enabled)),
|
||||||
);
|
);
|
||||||
foreach ($listofchoices as $choice => $val) {
|
foreach ($listofchoices as $choice => $val) {
|
||||||
|
if (empty($val['enabled'])) continue; // list not qualified
|
||||||
$checked = (((!GETPOSTISSET('search') && $action != 'searchfiles') || GETPOST($choice)) ? ' checked="checked"' : '');
|
$checked = (((!GETPOSTISSET('search') && $action != 'searchfiles') || GETPOST($choice)) ? ' checked="checked"' : '');
|
||||||
print '<div class="paddingleft inline-block marginrightonly"><input type="checkbox" id="'.$choice.'" name="'.$choice.'" value="1"'.$checked.'> <label for="'.$choice.'">'.$langs->trans($val['label']).'</label></div>';
|
print '<div class="paddingleft inline-block marginrightonly"><input type="checkbox" id="'.$choice.'" name="'.$choice.'" value="1"'.$checked.'> <label for="'.$choice.'">'.$langs->trans($val['label']).'</label></div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -710,10 +710,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
// Price
|
// Price
|
||||||
print '<td class="right">'.price($sign * $objp->total_ttc).'</td>';
|
print '<td class="right">'.price($sign * $objp->total_ttc).'</td>';
|
||||||
|
|
||||||
// Received or paid back
|
// Received + already paid
|
||||||
print '<td class="right">'.price($sign * $paiement);
|
print '<td class="right">'.price($sign * $paiement);
|
||||||
if ($creditnotes) print '+'.price($creditnotes);
|
if ($creditnotes) print '<span class="opacitymedium">+'.price($creditnotes).'</span>';
|
||||||
if ($deposits) print '+'.price($deposits);
|
if ($deposits) print '<span class="opacitymedium">+'.price($deposits).'</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Remain to take or to pay back
|
// Remain to take or to pay back
|
||||||
|
|||||||
@ -374,8 +374,7 @@ if (empty($reshook))
|
|||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($action == 'classin' && $user->rights->contrat->creer)
|
} elseif ($action == 'classin' && $user->rights->contrat->creer) {
|
||||||
{
|
|
||||||
$object->setProject(GETPOST('projectid'));
|
$object->setProject(GETPOST('projectid'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -137,10 +137,13 @@ class box_fournisseurs extends ModeleBoxes
|
|||||||
$line++;
|
$line++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($num == 0) $this->info_box_contents[$line][0] = array(
|
if ($num == 0) {
|
||||||
'td' => 'class="center opacitymedium"',
|
$langs->load("suppliers");
|
||||||
'text'=>$langs->trans("NoRecordedSuppliers"),
|
$this->info_box_contents[$line][0] = array(
|
||||||
);
|
'td' => 'class="center opacitymedium"',
|
||||||
|
'text'=>$langs->trans("NoRecordedSuppliers"),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -6852,6 +6852,7 @@ abstract class CommonObject
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Output value of the current field
|
||||||
if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate')
|
if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate')
|
||||||
{
|
{
|
||||||
$extrafields_collapse_num = '';
|
$extrafields_collapse_num = '';
|
||||||
|
|||||||
@ -4615,7 +4615,7 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
|
|||||||
}
|
}
|
||||||
if ((int) $limit > 0 && empty($hideselectlimit))
|
if ((int) $limit > 0 && empty($hideselectlimit))
|
||||||
{
|
{
|
||||||
$pagesizechoices = '10:10,15:15,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000,5000:5000';
|
$pagesizechoices = '10:10,15:15,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000,5000:5000,25000:25000';
|
||||||
//$pagesizechoices.=',0:'.$langs->trans("All"); // Not yet supported
|
//$pagesizechoices.=',0:'.$langs->trans("All"); // Not yet supported
|
||||||
//$pagesizechoices.=',2:2';
|
//$pagesizechoices.=',2:2';
|
||||||
if (!empty($conf->global->MAIN_PAGESIZE_CHOICES)) $pagesizechoices = $conf->global->MAIN_PAGESIZE_CHOICES;
|
if (!empty($conf->global->MAIN_PAGESIZE_CHOICES)) $pagesizechoices = $conf->global->MAIN_PAGESIZE_CHOICES;
|
||||||
|
|||||||
@ -81,7 +81,7 @@ function shipping_prepare_head($object)
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||||
$upload_dir = $conf->commande->dir_output."/".dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->expedition->dir_output."/sending/".dol_sanitizeFileName($object->ref);
|
||||||
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
||||||
$nbLinks = Link::count($db, $object->element, $object->id);
|
$nbLinks = Link::count($db, $object->element, $object->id);
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$object->id;
|
||||||
|
|||||||
@ -62,7 +62,11 @@ if ($absolute_discount > 0) {
|
|||||||
$text .= ' ('.$addabsolutediscount.')';
|
$text .= ' ('.$addabsolutediscount.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<div class="inline-block clearboth">'.$text.'</div>';
|
if ($isNewObject) {
|
||||||
|
print '<br>'.$text;
|
||||||
|
} else {
|
||||||
|
print '<div class="inline-block clearboth">'.$text.'</div>';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Discount available of type fixed amount (not credit note)
|
// Discount available of type fixed amount (not credit note)
|
||||||
$more = '('.$addabsolutediscount.')';
|
$more = '('.$addabsolutediscount.')';
|
||||||
@ -85,7 +89,11 @@ if ($absolute_creditnote > 0) {
|
|||||||
$text .= '('.$addabsolutediscount.')';
|
$text .= '('.$addabsolutediscount.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<div class="inline-block clearboth">'.$text.'</div>';
|
if ($isNewObject) {
|
||||||
|
print '<br>'.$text;
|
||||||
|
} else {
|
||||||
|
print '<div class="inline-block clearboth">'.$text.'</div>';
|
||||||
|
}
|
||||||
} else { // We can add a credit note on a down payment or standard invoice or situation invoice
|
} else { // We can add a credit note on a down payment or standard invoice or situation invoice
|
||||||
// There is credit notes discounts available
|
// There is credit notes discounts available
|
||||||
$more = $isInvoice && !$isNewObject ? ' ('.$viewabsolutediscount.')' : '';
|
$more = $isInvoice && !$isNewObject ? ' ('.$viewabsolutediscount.')' : '';
|
||||||
|
|||||||
@ -80,7 +80,9 @@ if ($action == 'addcontact' && $user->rights->expedition->creer)
|
|||||||
{
|
{
|
||||||
if ($result > 0 && $id > 0)
|
if ($result > 0 && $id > 0)
|
||||||
{
|
{
|
||||||
$result = $objectsrc->add_contact(GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'), $_POST["type"], $_POST["source"]);
|
$contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||||
|
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
|
||||||
|
$result = $objectsrc->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
|
|||||||
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("sendings", "deliveries", 'companies', 'bills'));
|
$langs->loadLangs(array("sendings", "deliveries", 'companies', 'bills', 'products'));
|
||||||
|
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'shipmentlist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'shipmentlist'; // To manage different context of search
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ if ($resql)
|
|||||||
|
|
||||||
if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category);
|
if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category);
|
||||||
if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus);
|
if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus);
|
||||||
if ($search_status != '') $param .= '&viewstatut='.urlencode($search_status);
|
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
||||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||||
|
|||||||
@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
$langs->loadLangs(array("orders", "sendings", 'deliveries', 'companies', 'compta', 'bills', 'projects', 'suppliers'));
|
$langs->loadLangs(array("orders", "sendings", 'deliveries', 'companies', 'compta', 'bills', 'projects', 'suppliers', 'products'));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$massaction = GETPOST('massaction', 'alpha');
|
$massaction = GETPOST('massaction', 'alpha');
|
||||||
|
|||||||
@ -67,11 +67,6 @@ if ($id > 0 || !empty($ref))
|
|||||||
$objectsrc = new CommandeFournisseur($db);
|
$objectsrc = new CommandeFournisseur($db);
|
||||||
$objectsrc->fetch($object->$typeobject->id);
|
$objectsrc->fetch($object->$typeobject->id);
|
||||||
}
|
}
|
||||||
if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled))
|
|
||||||
{
|
|
||||||
$objectsrc = new Propal($db);
|
|
||||||
$objectsrc->fetch($object->$typeobject->id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -83,7 +78,9 @@ if ($action == 'addcontact' && $user->rights->reception->creer)
|
|||||||
{
|
{
|
||||||
if ($result > 0 && $id > 0)
|
if ($result > 0 && $id > 0)
|
||||||
{
|
{
|
||||||
$result = $objectsrc->add_contact(GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'), $_POST["type"], $_POST["source"]);
|
$contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||||
|
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
|
||||||
|
$result = $objectsrc->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
|
|||||||
@ -505,7 +505,7 @@ if ($resql)
|
|||||||
if ($search_town) $param .= "&search_town=".urlencode($search_town);
|
if ($search_town) $param .= "&search_town=".urlencode($search_town);
|
||||||
if ($search_zip) $param .= "&search_zip=".urlencode($search_zip);
|
if ($search_zip) $param .= "&search_zip=".urlencode($search_zip);
|
||||||
if ($search_state) $param .= "&search_state=".urlencode($search_state);
|
if ($search_state) $param .= "&search_state=".urlencode($search_state);
|
||||||
if ($search_status) $param .= "&search_status=".urlencode($search_status);
|
if ($search_status != '') $param .= "&search_status=".urlencode($search_status);
|
||||||
if ($search_country) $param .= "&search_country=".urlencode($search_country);
|
if ($search_country) $param .= "&search_country=".urlencode($search_country);
|
||||||
if ($search_type_thirdparty) $param .= "&search_type_thirdparty=".urlencode($search_type_thirdparty);
|
if ($search_type_thirdparty) $param .= "&search_type_thirdparty=".urlencode($search_type_thirdparty);
|
||||||
if ($search_ref_supplier) $param .= "&search_ref_supplier=".urlencode($search_ref_supplier);
|
if ($search_ref_supplier) $param .= "&search_ref_supplier=".urlencode($search_ref_supplier);
|
||||||
|
|||||||
@ -345,7 +345,7 @@ if ($catid > 0) $sql .= " AND cu.fk_categorie = ".((int) $catid);
|
|||||||
if ($catid == -2) $sql .= " AND cu.fk_categorie IS NULL";
|
if ($catid == -2) $sql .= " AND cu.fk_categorie IS NULL";
|
||||||
if ($search_categ > 0) $sql .= " AND cu.fk_categorie = ".$db->escape($search_categ);
|
if ($search_categ > 0) $sql .= " AND cu.fk_categorie = ".$db->escape($search_categ);
|
||||||
if ($search_categ == -2) $sql .= " AND cu.fk_categorie IS NULL";
|
if ($search_categ == -2) $sql .= " AND cu.fk_categorie IS NULL";
|
||||||
if ($mode == 'employee' && empty($user->rights->salaries->readall)) $sql .= " AND s.fk_user IN (".join(',', $childids).")";
|
if ($mode == 'employee' && empty($user->rights->salaries->readall)) $sql .= " AND u.fk_user IN (".join(',', $childids).")";
|
||||||
// Add where from extra fields
|
// Add where from extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
|
|||||||
@ -153,7 +153,7 @@ if ($resql) {
|
|||||||
if ($targettype == 'contacts') {
|
if ($targettype == 'contacts') {
|
||||||
$oldcid = $obj->cid;
|
$oldcid = $obj->cid;
|
||||||
}
|
}
|
||||||
$oldlang = $obj->lang;
|
$oldlang = $obj->default_lang;
|
||||||
$oldtarget = (empty($obj->cfirstname) && empty($obj->clastname)) ? $obj->name : ($obj->clastname." ".$obj->cfirstname);
|
$oldtarget = (empty($obj->cfirstname) && empty($obj->clastname)) ? $obj->name : ($obj->clastname." ".$obj->cfirstname);
|
||||||
$message = '';
|
$message = '';
|
||||||
$total = 0;
|
$total = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user