Merge pull request #10 from Dolibarr/develop

Update fork
This commit is contained in:
Damien BENOIT 2021-03-10 15:42:49 +01:00 committed by GitHub
commit 628d434823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 200 additions and 105 deletions

View File

@ -147,6 +147,7 @@ if (empty($reshook)) {
// and pass CCCNNNNN + (num of company * 100 000 000) as offset to the run_sql as a new parameter to say to update sql on the fly to add offset to rowid and account_parent value.
// This is to be sure there is no conflict for each chart of account, whatever is country, whatever is company when multicompany is used.
$tmp = file_get_contents($sqlfile);
$reg = array();
if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg)) {
$offsetforchartofaccount += $reg[1];
}
@ -342,7 +343,7 @@ if ($resql) {
// Box to select active chart of account
print $langs->trans("Selectchartofaccounts")." : ";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
print '<select class="flat minwidth200" name="chartofaccounts" id="chartofaccounts">';
$sql = "SELECT a.rowid, a.pcg_version, a.label, a.active, c.code as country_code";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_system as a";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON a.fk_country = c.rowid AND c.active = 1";
@ -353,6 +354,7 @@ if ($resql) {
if ($resqlchart) {
$numbis = $db->num_rows($resqlchart);
$i = 0;
print '<option value="-1">&nbsp;</option>';
while ($i < $numbis) {
$obj = $db->fetch_object($resqlchart);

View File

@ -74,7 +74,7 @@ $nowarray = dol_getdate($now);
if (!GETPOSTISSET("date_startmonth")) {
$date_start = dol_get_first_day($nowarray['year'], $nowarray['mon'], 'tzuserrel');
} else if (GETPOST("date_startmonth") > 0) {
} elseif (GETPOST("date_startmonth") > 0) {
$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth", 'int'), GETPOST("date_startday", 'int'), GETPOST("date_startyear", 'int'), 'tzuserrel');
} else {
$date_start = -1;

View File

@ -16,9 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
use Luracast\Restler\RestException;
use Luracast\Restler\RestException;
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
/**
* API class for Agenda Events

View File

@ -323,7 +323,7 @@ if ($action == 'create') {
print $langs->trans("Date");
print '</td>';
print '<td>';
print $form->selectDate(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1);
print $form->selectDate(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1, 1);
print '</td>';
print "</tr>\n";
@ -536,10 +536,10 @@ if ($id > 0) {
// Amount
if ($action == 'edit') {
print '<tr><td>'.$langs->trans("AmountTTC")."</td><td>";
print '<input type="text" name="amount" size="12" class="flat" value="'.$object->amount.'">';
print '<input type="text" name="amount" size="12" class="flat" value="'.price($object->amount).'">';
print "</td></tr>";
} else {
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).'</td></tr>';
}
// Mode of payment

View File

@ -750,7 +750,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<input type="text" name="email" id="email" value="'.(GETPOSTISSET('email') ? GETPOST('email', 'alpha') : $object->email).'"></td>';
print '</tr>';
//Unsubscribe
// Unsubscribe
if (!empty($conf->mailing->enabled)) {
if ($conf->use_javascript_ajax && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS==-1) {
print "\n".'<script type="text/javascript" language="javascript">'."\n";
@ -784,6 +784,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr>';
print '<td><label for="'.$value['label'].'">'.$form->editfieldkey($value['label'], $key, '', $object, 0).'</label></td>';
print '<td colspan="3">';
if (!empty($value['icon'])) {
print '<span class="fa '.$value['icon'].'"></span>';
}
print '<input type="text" name="'.$key.'" id="'.$key.'" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET($key) ?GETPOST($key, 'alphanohtml') : $object->socialnetworks[$key]).'">';
print '</td>';
print '</tr>';
@ -1069,6 +1072,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr>';
print '<td><label for="'.$value['label'].'">'.$form->editfieldkey($value['label'], $key, '', $object, 0).'</label></td>';
print '<td colspan="3">';
if (!empty($value['icon'])) {
print '<span class="fa '.$value['icon'].'"></span>';
}
print '<input type="text" name="'.$key.'" id="'.$key.'" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET($key) ?GETPOST($key, 'alphanohtml') : $object->socialnetworks[$key]).'">';
print '</td>';
print '</tr>';

View File

@ -187,7 +187,7 @@ class box_members_by_type extends ModeleBoxes
);
$line++;
foreach ($AdherentType as $key => $adhtype) {
$SommeA += isset($MemberToValidate[$key]) ? $MemberToValidate[$key] : 0;
$SommeA += isset($MembersToValidate[$key]) ? $MembersToValidate[$key] : 0;
$SommeB += isset($MembersValidated[$key]) ? $MembersValidated[$key] - (isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0) : 0;
$SommeC += isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0;
$SommeD += isset($MembersResiliated[$key]) ? $MembersResiliated[$key] : 0;
@ -198,7 +198,7 @@ class box_members_by_type extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'text' => (isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0 ? $MemberToValidate[$key] : '') . ' ' . $staticmember->LibStatut(-1, $adhtype->subscription, 0, 3),
'text' => (isset($MembersToValidate[$key]) && $MembersToValidate[$key] > 0 ? $MembersToValidate[$key] : '') . ' ' . $staticmember->LibStatut(-1, $adhtype->subscription, 0, 3),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(

View File

@ -786,6 +786,14 @@ abstract class CommonDocGenerator
$resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key, $outputlangs);
// Load product data optional fields to the line -> enables to use "line_product_options_{extrafield}"
if (isset($line->fk_product) && $line->fk_product > 0) {
$tmpproduct = new Product($this->db);
$tmpproduct->fetch($line->fk_product);
foreach ($tmpproduct->array_options as $key=>$label)
$resarray["line_product_".$key] = $label;
}
return $resarray;
}

View File

@ -8255,12 +8255,21 @@ abstract class CommonObject
/**
* Function to concat keys of fields
*
* @return string
* @param string $alias String of alias of table for fields. For example 't'.
* @return string list of alias fields
*/
protected function getFieldList()
protected function getFieldList($alias = '')
{
$keys = array_keys($this->fields);
return implode(',', $keys);
if (!empty($alias)) {
$keys_with_alias = array();
foreach ($keys as $fieldname) {
$keys_with_alias[] = $alias . '.' . $fieldname;
}
return implode(',', $keys_with_alias);
} else {
return implode(',', $keys);
}
}
/**
@ -8462,23 +8471,23 @@ abstract class CommonObject
return -1;
}
$fieldlist = $this->getFieldList();
$fieldlist = $this->getFieldList('t');
if (empty($fieldlist)) {
return 0;
}
$sql = 'SELECT '.$fieldlist;
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element;
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
if (!empty($id)) {
$sql .= ' WHERE rowid = '.$id;
$sql .= ' WHERE t.rowid = '.$id;
} elseif (!empty($ref)) {
$sql .= " WHERE ref = ".$this->quote($ref, $this->fields['ref']);
$sql .= " WHERE t.ref = ".$this->quote($ref, $this->fields['ref']);
} else {
$sql .= ' WHERE 1 = 1'; // usage with empty id and empty ref is very rare
}
if (empty($id) && isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
$sql .= ' AND entity IN ('.getEntity($this->table_element).')';
$sql .= ' AND t.entity IN ('.getEntity($this->table_element).')';
}
if ($morewhere) {
$sql .= $morewhere;
@ -8522,9 +8531,9 @@ abstract class CommonObject
$objectline = new $objectlineclassname($this->db);
$sql = 'SELECT '.$objectline->getFieldList();
$sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element;
$sql .= ' WHERE fk_'.$this->element.' = '.$this->id;
$sql = 'SELECT '.$objectline->getFieldList('l');
$sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element.' as l';
$sql .= ' WHERE l.fk_'.$this->element.' = '.$this->id;
if ($morewhere) {
$sql .= $morewhere;
}

View File

@ -340,7 +340,7 @@ class FormAccounting extends Form
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
* @return string String with HTML select
*/
public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss = 'maxwidth300 maxwidthonsmartphone', $usecache = '')
public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss = 'minwidth100 maxwidth300 maxwidthonsmartphone', $usecache = '')
{
// phpcs:enable
global $conf, $langs;
@ -378,36 +378,44 @@ class FormAccounting extends Form
return -1;
}
$selected = $selectid; // selectid can be -1, 0, 123
while ($obj = $this->db->fetch_object($resql)) {
if (empty($obj->labelshort)) {
$labeltoshow = $obj->label;
} else {
$labeltoshow = $obj->labelshort;
}
$num_rows = $this->db->num_rows($resql);
$label = length_accountg($obj->account_number).' - '.$labeltoshow;
$label = dol_trunc($label, $trunclength);
if ($num_rows == 0) {
$langs->load("errors");
$showempty = $langs->trans("ErrorYouMustFirstSetupYourChartOfAccount");
} else {
$selected = $selectid; // selectid can be -1, 0, 123
while ($obj = $this->db->fetch_object($resql)) {
if (empty($obj->labelshort)) {
$labeltoshow = $obj->label;
} else {
$labeltoshow = $obj->labelshort;
}
$select_value_in = $obj->rowid;
$select_value_out = $obj->rowid;
$label = length_accountg($obj->account_number).' - '.$labeltoshow;
$label = dol_trunc($label, $trunclength);
// Try to guess if we have found default value
if ($select_in == 1) {
$select_value_in = $obj->account_number;
}
if ($select_out == 1) {
$select_value_out = $obj->account_number;
}
// Remember guy's we store in database llx_facturedet the rowid of accounting_account and not the account_number
// Because same account_number can be share between different accounting_system and do have the same meaning
if ($selectid != '' && $selectid == $select_value_in) {
//var_dump("Found ".$selectid." ".$select_value_in);
$selected = $select_value_out;
}
$select_value_in = $obj->rowid;
$select_value_out = $obj->rowid;
$options[$select_value_out] = $label;
// Try to guess if we have found default value
if ($select_in == 1) {
$select_value_in = $obj->account_number;
}
if ($select_out == 1) {
$select_value_out = $obj->account_number;
}
// Remember guy's we store in database llx_facturedet the rowid of accounting_account and not the account_number
// Because same account_number can be share between different accounting_system and do have the same meaning
if ($selectid != '' && $selectid == $select_value_in) {
//var_dump("Found ".$selectid." ".$select_value_in);
$selected = $select_value_out;
}
$options[$select_value_out] = $label;
}
}
$this->db->free($resql);
if ($usecache) {
@ -416,7 +424,7 @@ class FormAccounting extends Form
}
}
$out .= Form::selectarray($htmlname, $options, $selected, ($showempty > 0 ? 1 : 0), 0, 0, '', 0, 0, 0, '', $morecss, 1);
$out .= Form::selectarray($htmlname, $options, $selected, ($showempty ? (is_numeric($showempty) ? 1 : $showempty): 0), 0, 0, '', 0, 0, 0, '', $morecss, 1);
return $out;
}

View File

@ -1368,7 +1368,7 @@ class FormFile
// $section is inside $param
$newparam .= preg_replace('/&file=.*$/', '', $param); // We don't need param file=
$backtopage = DOL_URL_ROOT.'/ecm/index.php?&section_dir='.urlencode($relativepath).$newparam;
print '<a class="editfielda" href="'.DOL_URL_ROOT.'/ecm/file_card.php?urlfile='.urlencode($file['name']).$param.'&backtopage='.urlencode($backtopage).'" class="editfilelink" rel="'.urlencode($file['name']).'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
print '<a class="editfielda editfilelink" href="'.DOL_URL_ROOT.'/ecm/file_card.php?urlfile='.urlencode($file['name']).$param.'&backtopage='.urlencode($backtopage).'" rel="'.urlencode($file['name']).'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
}
if (empty($useinecm) || $useinecm == 2 || $useinecm == 6) { // 6=Media file manager
@ -1392,7 +1392,7 @@ class FormFile
if ($permtoeditline) {
$paramsectiondir = (in_array($modulepart, array('medias', 'ecm')) ? '&section_dir='.urlencode($relativepath) : '');
print '<a class="editfielda reposition" href="'.(($useinecm == 1 || $useinecm == 5) ? '#' : ($url.'?action=editfile&urlfile='.urlencode($filepath).$paramsectiondir.$param)).'" class="editfilelink" rel="'.$filepath.'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
print '<a class="editfielda reposition editfilelink" href="'.(($useinecm == 1 || $useinecm == 5) ? '#' : ($url.'?action=editfile&urlfile='.urlencode($filepath).$paramsectiondir.$param)).'" rel="'.$filepath.'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
}
}
if ($permonobject) {

View File

@ -3447,14 +3447,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt',
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
'help', 'holiday',
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'long-arrow-alt-right',
'intervention', 'inventory', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'long-arrow-alt-right',
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_asset', 'object_barcode', 'object_bill', 'object_billr', 'object_billa', 'object_billd', 'object_bom',
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert',
'object_folder', 'object_folder-open','object_generic',
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_inventory', 'object_label',
'object_margin', 'object_members', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
'object_lot', 'object_mrp', 'object_other',
'object_payment', 'object_pdf', 'object_product', 'object_propal',
@ -3500,7 +3500,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'user-friends', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
'email'=>'at',
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', 'loan'=>'money-bill-alt',
'generic'=>'file', 'holiday'=>'umbrella-beach', 'inventory'=>'boxes', 'label'=>'layer-group', 'loan'=>'money-bill-alt',
'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
'trip'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
'sign-out'=>'sign-out-alt',
@ -3604,7 +3604,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'cog'=>'#999', 'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#6c6aa8', 'dynamicprice'=>'#a69944',
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'help'=>'#bbb', 'listlight'=>'#999', 'language'=>'#555',
'dolly'=>'#a69944', 'dollyrevert'=>'#a69944', 'lot'=>'#a69944',
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944',
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'inventory'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944',
'other'=>'#ddd',
'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba',
'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'timespent'=>'#555', 'uparrow'=>'#555', 'user-cog'=>'#999', 'globe-americas'=>'#aaa',

View File

@ -1609,7 +1609,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->lire);
}
} else {
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock');
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"'));
if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") {
$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->inventory_advance->write);
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->inventory_advance->read);

View File

@ -1550,13 +1550,18 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$this->cols['subprice'] = array(
'rank' => $rank,
'width' => 19, // in mm
'status' => true,
'status' => false,
'title' => array(
'textkey' => 'PriceUHT'
),
'border-left' => true, // add left line separator
);
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE))
{
$this->cols['subprice']['status'] = true;
}
$rank = $rank + 10;
$this->cols['qty'] = array(
'rank' => $rank,
@ -1607,6 +1612,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders
'border-left' => true, // add left line separator
);
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN))
{
$this->cols['totalexcltax']['status'] = true;
}
// Add extrafields cols
if (!empty($object->lines)) {
$line = reset($object->lines);

View File

@ -339,10 +339,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetDrawColor(128, 128, 128);
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
$pdf->SetSubject($outputlangs->transnoentities("Order"));
$pdf->SetSubject($outputlangs->transnoentities("PurchaseOrder"));
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PurchaseOrder")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) {
$pdf->SetCompression(false);
}
@ -526,16 +527,18 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
// VAT Rate
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) {
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) {
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxtva, $curY);
$pdf->MultiCell($this->posxup - $this->posxtva - 1, 3, $vat_rate, 0, 'R');
}
// Unit price before discount
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxup, $curY);
$pdf->MultiCell($this->posxqty - $this->posxup - 0.8, 3, $up_excl_tax, 0, 'R', 0);
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE)) {
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxup, $curY);
$pdf->MultiCell($this->posxqty - $this->posxup - 0.8, 3, $up_excl_tax, 0, 'R', 0);
}
// Quantity
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
@ -557,9 +560,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
// Total HT line
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
$pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN)) {
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
$pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
}
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) {

View File

@ -203,18 +203,23 @@ if (!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck)) {
}
// Another test is done later on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on.
}
if (empty($dolibarr_main_db_host)) {
if (empty($dolibarr_main_db_host) && !defined('NOREQUIREDB')) {
print '<div class="center">Dolibarr setup is not yet complete.<br><br>'."\n";
print '<a href="install/index.php">Click here to finish Dolibarr install process</a> ...</div>'."\n";
die;
}
if (empty($dolibarr_main_url_root)) {
if (empty($dolibarr_main_url_root) && !defined('NOREQUIREVIRTUALURL')) {
print 'Value for parameter \'dolibarr_main_url_root\' is not defined in your \'htdocs\conf\conf.php\' file.<br>'."\n";
print 'You must add this parameter with your full Dolibarr root Url (Example: http://myvirtualdomain/ or http://mydomain/mydolibarrurl/)'."\n";
die;
}
if (empty($dolibarr_main_document_root_alt)) {
$dolibarr_main_document_root_alt = $dolibarr_main_document_root.'/custom';
}
if (empty($dolibarr_main_data_root)) {
// Si repertoire documents non defini, on utilise celui par defaut
// If directory not defined, we use the default hardcoded value
$dolibarr_main_data_root = str_replace("/htdocs", "", $dolibarr_main_document_root);
$dolibarr_main_data_root .= "/documents";
}

View File

@ -162,9 +162,12 @@ if (empty($reshook)) {
$description = trim(GETPOST('description', 'restricthtml'));
// Check that leave is for a user inside the hierarchy or advanced permission for all is set
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->write)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) {
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->write))
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->id == $fuserid && empty($user->rights->holiday->write))
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->id != $fuserid && empty($user->rights->holiday->writeall_advance))
) {
$error++;
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors');
} else {
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) {
if (!in_array($fuserid, $childids)) {

View File

@ -328,7 +328,7 @@ ALTER TABLE llx_product MODIFY COLUMN desiredstock float;
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN seuil_stock_alerte float;
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN desiredstock float;
ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL;
ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL AFTER fk_country;
ALTER TABLE llx_projet ADD COLUMN email_msgid varchar(255);
ALTER TABLE llx_ticket ADD COLUMN email_msgid varchar(255);

View File

@ -19,7 +19,7 @@
create table llx_c_civility
(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
code varchar(6) NOT NULL,
label varchar(50),
active tinyint DEFAULT 1 NOT NULL,

View File

@ -260,6 +260,7 @@ ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this oper
ErrorDateIsInFuture=Error, the date can't be in the future
ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory
ErrorAPercentIsRequired=Error, please fill in the percentage correctly
ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.

View File

@ -425,7 +425,7 @@ class MyObject extends CommonObject
$records = array();
$sql = 'SELECT ';
$sql .= $this->getFieldList();
$sql .= $this->getFieldList('t');
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
$sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')';

View File

@ -23,6 +23,29 @@
* \brief This file is an example for a command line script for module MyModule
*/
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs
//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters
//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on).
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library
//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too.
//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value
//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler
//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message
//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies
//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification
if (!defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path = __DIR__.'/';

View File

@ -1333,7 +1333,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT);
}
print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, '');
print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>';
// Accountancy_code_sell_intra
@ -1345,7 +1345,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT);
}
print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, '');
print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>';
}
@ -1357,18 +1357,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT);
}
print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, '');
print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>';
// Accountancy_code_buy
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
print '<td>';
if ($type == 0) {
$accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT);
} else {
$accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT);
}
print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, '');
if ($type == 0) {
$accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT);
} else {
$accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT);
}
print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>';
// Accountancy_code_buy_intra
@ -1380,7 +1380,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT);
}
print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, '');
print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>';
}
@ -1392,7 +1392,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
} else {
$accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT);
}
print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, '');
print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1);
print '</td></tr>';
} else // For external software
{
@ -1509,7 +1509,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<table class="border allwidth">';
// Ref
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>';
// Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag($object->label).'"></td></tr>';
@ -1746,21 +1746,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!empty($conf->accounting->enabled)) {
// Accountancy_code_sell
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td>';
print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1);
print '</td></tr>';
// Accountancy_code_sell_intra
if ($mysoc->isInEEC()) {
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
print '<td>';
print $formaccounting->select_account($object->accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, '', 1, 1);
print '</td></tr>';
}
// Accountancy_code_sell_export
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellExportCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>';
print '<td>';
print $formaccounting->select_account($object->accountancy_code_sell_export, 'accountancy_code_sell_export', 1, '', 1, 1);
print '</td></tr>';
@ -1773,33 +1773,33 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Accountancy_code_buy_intra
if ($mysoc->isInEEC()) {
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>';
print '<td>';
print $formaccounting->select_account($object->accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, '', 1, 1);
print '</td></tr>';
}
// Accountancy_code_buy_export
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>';
print '<td>';
print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1);
print '</td></tr>';
} else {
// For external software
// Accountancy_code_sell
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>';
print '<td><input name="accountancy_code_sell" class="maxwidth200" value="'.$object->accountancy_code_sell.'">';
print '</td></tr>';
// Accountancy_code_sell_intra
if ($mysoc->isInEEC()) {
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>';
print '<td><input name="accountancy_code_sell_intra" class="maxwidth200" value="'.$object->accountancy_code_sell_intra.'">';
print '</td></tr>';
}
// Accountancy_code_sell_export
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellExportCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>';
print '<td><input name="accountancy_code_sell_export" class="maxwidth200" value="'.$object->accountancy_code_sell_export.'">';
print '</td></tr>';
@ -1810,13 +1810,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Accountancy_code_buy_intra
if ($mysoc->isInEEC()) {
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>';
print '<td><input name="accountancy_code_buy_intra" class="maxwidth200" value="'.$object->accountancy_code_buy_intra.'">';
print '</td></tr>';
}
// Accountancy_code_buy_export
print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>';
print '<td><input name="accountancy_code_buy_export" class="maxwidth200" value="'.$object->accountancy_code_buy_export.'">';
print '</td></tr>';
}

View File

@ -421,9 +421,10 @@ class Product extends CommonObject
public $fields = array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
'ref' =>array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
'barcode' =>array('type'=>'varchar(255)', 'label'=>'Barcode', 'enabled'=>'!empty($conf->barcode->enabled)', 'visible'=>-1, 'showoncombobox'=>1),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>5),
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>15),
'barcode' =>array('type'=>'varchar(255)', 'label'=>'Barcode', 'enabled'=>'!empty($conf->barcode->enabled)', 'position'=>20, 'visible'=>-1, 'showoncombobox'=>1),
'fk_barcode_type' => array('type'=>'integer', 'label'=>'BarcodeType', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>-1,),
'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61),
'note' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62),
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
@ -432,6 +433,10 @@ class Product extends CommonObject
'fk_user_author'=>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'llx_user.rowid'),
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511),
//'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512),
'localtax1_tx' => array('type'=>'double(6,3)', 'label'=>'Localtax1tx', 'enabled'=>'1', 'position'=>150, 'notnull'=>0, 'visible'=>-1,),
'localtax1_type' => array('type'=>'varchar(10)', 'label'=>'Localtax1type', 'enabled'=>'1', 'position'=>155, 'notnull'=>1, 'visible'=>-1,),
'localtax2_tx' => array('type'=>'double(6,3)', 'label'=>'Localtax2tx', 'enabled'=>'1', 'position'=>160, 'notnull'=>0, 'visible'=>-1,),
'localtax2_type' => array('type'=>'varchar(10)', 'label'=>'Localtax2type', 'enabled'=>'1', 'position'=>165, 'notnull'=>1, 'visible'=>-1,),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000),
//'tosell' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')),
//'tobuy' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')),

View File

@ -57,7 +57,7 @@ class Inventory extends CommonObject
/**
* @var string String with name of icon for inventory
*/
public $picto = 'stock';
public $picto = 'inventory';
const STATUS_DRAFT = 0;
const STATUS_VALIDATED = 1;

View File

@ -351,7 +351,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/inventory/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'product', 0, $newcardbutton, '', $limit);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit);
// Add code for pre mass action (confirmation or email presend form)
$topicmail = "Information";

View File

@ -600,7 +600,10 @@ if (!empty($arrayfields['t.progress']['checked'])) {
/*print '<td class="right maxwidth100">'.$langs->trans("TimeSpent").'</td>';
if ($usertoprocess->id == $user->id) print '<td class="right maxwidth100">'.$langs->trans("TimeSpentByYou").'</td>';
else print '<td class="right maxwidth100">'.$langs->trans("TimeSpentByUser").'</td>';*/
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br><span class="opacitymedium">'.$langs->trans("Everybody").'</span></th>';
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
print '</th>';
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>';
print '<th class="center leftborder">'.$langs->trans("HourStart").'</td>';

View File

@ -491,7 +491,10 @@ print '<td align="right" class="maxwidth75">'.$langs->trans("ProgressDeclared").
/*print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").'</td>';
if ($usertoprocess->id == $user->id) print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentByYou").'</td>';
else print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentByUser").'</td>';*/
print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").'<br><span class="opacitymedium">'.$langs->trans("Everybody").'</span></td>';
print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").'<br>';
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
print '</td>';
print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</td>';
foreach ($TWeek as $week_number) {

View File

@ -657,7 +657,10 @@ if (!empty($arrayfields['t.progress']['checked'])) {
/*print '<td class="maxwidth75 right">'.$langs->trans("TimeSpent").'</td>';
if ($usertoprocess->id == $user->id) print '<td class="maxwidth75 right">'.$langs->trans("TimeSpentByYou").'</td>';
else print '<td class="maxwidth75 right">'.$langs->trans("TimeSpentByUser").'</td>';*/
print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").'<br><span class="opacitymedium">'.$langs->trans("Everybody").'</span></th>';
print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").'<br>';
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
print '</th>';
print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>';
for ($idw = 0; $idw < 7; $idw++) {

View File

@ -1823,7 +1823,7 @@ class Thirdparties extends DolibarrApi
*
* Return an array with thirdparty informations
*
* @param int $rowid Id of third party to load
* @param int $rowid Id of third party to load (Use 0 to get a specimen record, use null to use other search criterias)
* @param string $ref Reference of third party, name (Warning, this can return several records)
* @param string $ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr)
* @param string $barcode Barcode of third party to load

View File

@ -1076,7 +1076,7 @@ if (!empty($arrayfields['country.code_iso']['checked'])) {
if (!empty($arrayfields['typent.code']['checked'])) {
print '<td class="liste_titre maxwidthonsmartphone center">';
// We use showempty=0 here because there is already an unknown value into dictionary.
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'minwidth50 maxwidth100', 1);
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'minwidth50 maxwidth100', 1);
print '</td>';
}
// Multiprice level

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB