Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
04f0cdac18
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -290,8 +291,18 @@ if ($user->rights->categorie->supprimer)
|
||||
|
||||
print "</div>";
|
||||
|
||||
if (! empty($user->rights->categorie->creer))
|
||||
{
|
||||
$link = DOL_URL_ROOT.'/categories/card.php';
|
||||
$link .= '?action=create';
|
||||
$link .= '&type='.$type;
|
||||
$link .= '&catorigin='.$object->id;
|
||||
$link .= '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.'&id='.$id);
|
||||
|
||||
|
||||
print '<div class="right">';
|
||||
print dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', $link);
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
$cats = $object->get_filles();
|
||||
if ($cats < 0)
|
||||
|
||||
@ -392,6 +392,7 @@ class ExtraFields
|
||||
if (empty($list)) $list = '0';
|
||||
if (empty($required)) $required = 0;
|
||||
if (empty($unique)) $unique = 0;
|
||||
if (empty($printable)) $printable = 0;
|
||||
if (empty($alwayseditable)) $alwayseditable = 0;
|
||||
if (empty($totalizable)) $totalizable = 0;
|
||||
|
||||
|
||||
@ -2141,7 +2141,7 @@ class Form
|
||||
}
|
||||
}
|
||||
|
||||
$selectFields = " p.rowid, p.ref, p.label, p.description, p.barcode, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.duration, p.fk_price_expression";
|
||||
$selectFields = " p.rowid, p.ref, p.label, p.description, p.barcode, p.fk_country as country_id, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.duration, p.fk_price_expression";
|
||||
if (count($warehouseStatusArray))
|
||||
{
|
||||
$selectFieldsGrouped = ", sum(".$db->ifsql("e.statut IS NULL", "0", "ps.reel").") as stock"; // e.statut is null if there is no record in stock
|
||||
@ -2445,6 +2445,7 @@ class Form
|
||||
$outlabel = '';
|
||||
$outdesc = '';
|
||||
$outbarcode = '';
|
||||
$outorigin = '';
|
||||
$outtype = '';
|
||||
$outprice_ht = '';
|
||||
$outprice_ttc = '';
|
||||
@ -2464,6 +2465,7 @@ class Form
|
||||
$outlabel = $objp->label;
|
||||
$outdesc = $objp->description;
|
||||
$outbarcode = $objp->barcode;
|
||||
$outorigin = $objp->country_id;
|
||||
$outpbq = empty($objp->price_by_qty_rowid) ? '' : $objp->price_by_qty_rowid;
|
||||
|
||||
$outtype = $objp->fk_product_type;
|
||||
@ -2525,12 +2527,15 @@ class Form
|
||||
$opt .= $objp->ref;
|
||||
if ($outbarcode) $opt .= ' ('.$outbarcode.')';
|
||||
$opt .= ' - '.dol_trunc($label, $maxlengtharticle);
|
||||
if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) $opt .= ' ('.getCountry($outorigin, 1).')';
|
||||
|
||||
$objRef = $objp->ref;
|
||||
if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey).')/i', '<strong>$1</strong>', $objRef, 1);
|
||||
$outval .= $objRef;
|
||||
if ($outbarcode) $outval .= ' ('.$outbarcode.')';
|
||||
$outval .= ' - '.dol_trunc($label, $maxlengtharticle);
|
||||
if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) $outval .= ' ('.getCountry($outorigin, 1).')';
|
||||
|
||||
// Units
|
||||
$opt .= $outvalUnits;
|
||||
$outval .= $outvalUnits;
|
||||
|
||||
@ -733,7 +733,6 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
|
||||
?>
|
||||
</a></div>
|
||||
<div class="inline-block valignmiddle" id="customerandsales">
|
||||
<a class="valignmiddle" id="customer" onclick="Customer();"></a>
|
||||
</div>
|
||||
<div class="inline-block valignmiddle" id="moreinfo"></div>
|
||||
<div class="inline-block valignmiddle" id="infowarehouse"></div>
|
||||
|
||||
@ -717,7 +717,7 @@ $( document ).ready(function() {
|
||||
|
||||
<?php
|
||||
$s = $langs->trans("Customer");
|
||||
if ($invoice->socid != $conf->global->$constforcompanyid) {
|
||||
if ($invoice->id > 0 && ($invoice->socid != $conf->global->$constforcompanyid)) {
|
||||
$s = $soc->name;
|
||||
}
|
||||
?>
|
||||
@ -733,17 +733,17 @@ $( document ).ready(function() {
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
echo '$("#customerandsales").append(\'';
|
||||
if ($placeid==$obj->rowid) echo "<b>";
|
||||
echo '<a class="valignmiddle" onclick="location.href=\\\'index.php?place=';
|
||||
echo '<a class="valignmiddle" onclick="place=\\\'';
|
||||
$num_sale=str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $obj->ref));
|
||||
echo $num_sale;
|
||||
if (str_replace("-", "", $num_sale)>$max_sale) $max_sale=str_replace("-", "", $num_sale);
|
||||
echo '\\\'">'.date('H:i', strtotime($obj->datec));
|
||||
echo '\\\';Refresh();">'.date('H:i', strtotime($obj->datec));
|
||||
if ($placeid==$obj->rowid) echo "</b>";
|
||||
echo '</a>\');';
|
||||
}
|
||||
echo '$("#customerandsales").append(\'<a onclick="location.href=\\\'index.php?place=0-';
|
||||
echo '$("#customerandsales").append(\'<a onclick="place=\\\'0-';
|
||||
echo $max_sale+1;
|
||||
echo '\\\'"><span class="fa fa-plus-square" title="'.dol_escape_htmltag($langs->trans("StartAParallelSale")).'"></a>\');';
|
||||
echo '\\\';Refresh();"><span class="fa fa-plus-square" title="'.dol_escape_htmltag($langs->trans("StartAParallelSale")).'"></a>\');';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user