Merge remote-tracking branch 'uptream/6.0' into 6.0-d1
This commit is contained in:
commit
95672e3bf0
@ -1260,7 +1260,7 @@ class BookKeeping extends CommonObject
|
||||
|
||||
global $user;
|
||||
$error = 0;
|
||||
$object = new Accountingbookkeeping($this->db);
|
||||
$object = new BookKeeping($this->db);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
@ -401,7 +401,7 @@ if (! $error && $action == 'writebookkeeping') {
|
||||
$bookkeeping->numero_compte = $k;
|
||||
$bookkeeping->label_operation = $val["label"];
|
||||
$bookkeeping->label_compte = $langs->trans("Bank");
|
||||
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
|
||||
$bookkeeping->montant = $mt;
|
||||
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
|
||||
$bookkeeping->debit = ($mt >= 0 ? $mt : 0);
|
||||
$bookkeeping->credit = ($mt < 0 ? - $mt : 0);
|
||||
@ -462,7 +462,7 @@ if (! $error && $action == 'writebookkeeping') {
|
||||
$bookkeeping->fk_doc = $key;
|
||||
$bookkeeping->fk_docdet = $val["fk_bank"];
|
||||
$bookkeeping->label_operation = $tabcompany[$key]['name'];
|
||||
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
|
||||
$bookkeeping->montant = $mt;
|
||||
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
||||
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
|
||||
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
|
||||
|
||||
@ -203,7 +203,7 @@ if ($action == 'writebookkeeping') {
|
||||
$bookkeeping->label_operation = $tabuser[$key]['name'];
|
||||
$bookkeeping->montant = $mt;
|
||||
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
|
||||
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
|
||||
$bookkeeping->debit = ($mt <= 0) ? -$mt : 0;
|
||||
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
|
||||
$bookkeeping->code_journal = $journal;
|
||||
$bookkeeping->journal_label = $journal_label;
|
||||
|
||||
@ -1750,6 +1750,7 @@ if ($action == 'create')
|
||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->propal->creer, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' (<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?socid='.$object->thirdparty->id.'">'.$langs->trans("OtherProposals").'</a>)';
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
|
||||
@ -1924,6 +1924,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' (<a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->thirdparty->id.'">'.$langs->trans("OtherOrders").'</a>)';
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
|
||||
@ -72,7 +72,7 @@ class BankAccounts extends DolibarrApi
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."bank_account as t";
|
||||
$sql.= ' WHERE t.entity IN ('.getEntity('bank_account').')';
|
||||
// Add sql filters
|
||||
if ($sqlfilters)
|
||||
if ($sqlfilters)
|
||||
{
|
||||
if (! DolibarrApi::_checkFilters($sqlfilters))
|
||||
{
|
||||
@ -81,7 +81,7 @@ class BankAccounts extends DolibarrApi
|
||||
$regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
|
||||
$sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
|
||||
}
|
||||
|
||||
|
||||
$sql.= $this->db->order($sortfield, $sortorder);
|
||||
if ($limit) {
|
||||
if ($page < 0)
|
||||
@ -89,10 +89,10 @@ class BankAccounts extends DolibarrApi
|
||||
$page = 0;
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
|
||||
|
||||
$sql.= $this->db->plimit($limit + 1, $offset);
|
||||
}
|
||||
|
||||
|
||||
dol_syslog("API Rest request");
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
@ -236,7 +236,7 @@ class BankAccounts extends DolibarrApi
|
||||
function _validate($data)
|
||||
{
|
||||
$account = array();
|
||||
foreach (Accounts::$FIELDS as $field) {
|
||||
foreach (BankAccounts::$FIELDS as $field) {
|
||||
if (! isset($data[$field]))
|
||||
throw new RestException(400, "$field field missing");
|
||||
$account[$field] = $data[$field];
|
||||
|
||||
@ -3075,6 +3075,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' (<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->thirdparty->id.'">'.$langs->trans("OtherBills").'</a>)';
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
|
||||
@ -1311,7 +1311,7 @@ else
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('RIB');
|
||||
print '<td>';
|
||||
if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon))
|
||||
if (($action != 'editbankaccount') && $user->rights->facture->creer && ! empty($object->brouillon))
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
|
||||
@ -332,7 +332,7 @@ if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights-
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
|
||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
|
||||
@ -523,7 +523,6 @@ while ($i < min($num,$limit))
|
||||
$contractstatic->ref=$obj->ref?$obj->ref:$obj->cid;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
|
||||
@ -334,23 +334,23 @@ abstract class CommonObject
|
||||
// No constructor as it is an abstract class
|
||||
|
||||
|
||||
/**
|
||||
* Check an object id/ref exists
|
||||
* If you don't need/want to instantiate object and just need to know if object exists, use this method instead of fetch
|
||||
*
|
||||
/**
|
||||
* Check an object id/ref exists
|
||||
* If you don't need/want to instantiate object and just need to know if object exists, use this method instead of fetch
|
||||
*
|
||||
* @param string $element String of element ('product', 'facture', ...)
|
||||
* @param int $id Id of object
|
||||
* @param string $ref Ref of object to check
|
||||
* @param string $ref_ext Ref ext of object to check
|
||||
* @return int <0 if KO, 0 if OK but not found, >0 if OK and exists
|
||||
*/
|
||||
static function isExistingObject($element, $id, $ref='', $ref_ext='')
|
||||
{
|
||||
global $db,$conf;
|
||||
*/
|
||||
static function isExistingObject($element, $id, $ref='', $ref_ext='')
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
$sql = "SELECT rowid, ref, ref_ext";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
|
||||
$sql.= " WHERE entity IN (".getEntity($element, true).")" ;
|
||||
$sql.= " WHERE entity IN (".getEntity($element).")" ;
|
||||
|
||||
if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
|
||||
else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";
|
||||
@ -371,17 +371,17 @@ abstract class CommonObject
|
||||
else return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to output saved errors
|
||||
*
|
||||
* @return string String with errors
|
||||
*/
|
||||
function errorsToString()
|
||||
{
|
||||
return $this->error.(is_array($this->errors)?(($this->error!=''?', ':'').join(', ',$this->errors)):'');
|
||||
}
|
||||
/**
|
||||
* Method to output saved errors
|
||||
*
|
||||
* @return string String with errors
|
||||
*/
|
||||
function errorsToString()
|
||||
{
|
||||
return $this->error.(is_array($this->errors)?(($this->error!=''?', ':'').join(', ',$this->errors)):'');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return full name (civility+' '+name+' '+lastname)
|
||||
@ -3947,7 +3947,7 @@ abstract class CommonObject
|
||||
|
||||
// Now we add first model found in directories scanned
|
||||
$listofdir=explode(',',$dirtoscan);
|
||||
foreach($listofdir as $key=>$tmpdir)
|
||||
foreach($listofdir as $key => $tmpdir)
|
||||
{
|
||||
$tmpdir=trim($tmpdir);
|
||||
$tmpdir=preg_replace('/DOL_DATA_ROOT/',DOL_DATA_ROOT,$tmpdir);
|
||||
|
||||
@ -1447,55 +1447,55 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
*
|
||||
* @return int Error count (0 if ok)
|
||||
*/
|
||||
function insert_tabs()
|
||||
{
|
||||
global $conf;
|
||||
function insert_tabs()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
$err=0;
|
||||
|
||||
if (! empty($this->tabs))
|
||||
{
|
||||
$i=0;
|
||||
foreach ($this->tabs as $key => $value)
|
||||
{
|
||||
if (is_array($value) && count($value) == 0) continue; // Discard empty arrays
|
||||
if (! empty($this->tabs))
|
||||
{
|
||||
$i=0;
|
||||
foreach ($this->tabs as $key => $value)
|
||||
{
|
||||
if (is_array($value) && count($value) == 0) continue; // Discard empty arrays
|
||||
|
||||
$entity=$conf->entity;
|
||||
$newvalue = $value;
|
||||
$entity=$conf->entity;
|
||||
$newvalue = $value;
|
||||
|
||||
if (is_array($value))
|
||||
{
|
||||
$newvalue = $value['data'];
|
||||
if (isset($value['entity'])) $entity = $value['entity'];
|
||||
}
|
||||
if (is_array($value))
|
||||
{
|
||||
$newvalue = $value['data'];
|
||||
if (isset($value['entity'])) $entity = $value['entity'];
|
||||
}
|
||||
|
||||
if ($newvalue)
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (";
|
||||
$sql.= "name";
|
||||
$sql.= ", type";
|
||||
$sql.= ", value";
|
||||
$sql.= ", note";
|
||||
$sql.= ", visible";
|
||||
$sql.= ", entity";
|
||||
$sql.= ")";
|
||||
$sql.= " VALUES (";
|
||||
$sql.= $this->db->encrypt($this->const_name."_TABS_".$i,1);
|
||||
$sql.= ", 'chaine'";
|
||||
$sql.= ", ".$this->db->encrypt($value,1);
|
||||
$sql.= ", null";
|
||||
$sql.= ", '0'";
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
if ($newvalue)
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (";
|
||||
$sql.= "name";
|
||||
$sql.= ", type";
|
||||
$sql.= ", value";
|
||||
$sql.= ", note";
|
||||
$sql.= ", visible";
|
||||
$sql.= ", entity";
|
||||
$sql.= ")";
|
||||
$sql.= " VALUES (";
|
||||
$sql.= $this->db->encrypt($this->const_name."_TABS_".$i,1);
|
||||
$sql.= ", 'chaine'";
|
||||
$sql.= ", ".$this->db->encrypt($newvalue,1);
|
||||
$sql.= ", null";
|
||||
$sql.= ", '0'";
|
||||
$sql.= ", ".$entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
return $err;
|
||||
}
|
||||
dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG);
|
||||
$this->db->query($sql);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
return $err;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds constants
|
||||
|
||||
@ -211,7 +211,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
if (! is_object($object))
|
||||
{
|
||||
$id = $object;
|
||||
$object = new Contract($this->db);
|
||||
$object = new Contrat($this->db);
|
||||
$result=$object->fetch($id);
|
||||
if ($result < 0)
|
||||
{
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -255,16 +255,16 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// Set nblignes with the new facture lines content after hook
|
||||
$nblignes = count($object->lines);
|
||||
$nbpayments = count($object->getListOfPayments());
|
||||
|
||||
|
||||
// Create pdf instance
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
|
||||
$heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
{
|
||||
$pdf->setPrintHeader(false);
|
||||
@ -509,7 +509,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
// Enough for 6 chars
|
||||
|
||||
|
||||
if ($this->situationinvoice)
|
||||
{
|
||||
$pdf->MultiCell($this->posxprogress-$this->posxqty-0.8, 4, $qty, 0, 'R');
|
||||
@ -769,7 +769,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 4);
|
||||
|
||||
|
||||
|
||||
// Loop on each deposits and credit notes included
|
||||
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
|
||||
$sql.= " re.description, re.fk_facture_source,";
|
||||
@ -822,7 +822,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$sql.= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = ".$object->id;
|
||||
//$sql.= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = 1";
|
||||
$sql.= " ORDER BY p.datep";
|
||||
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -1052,7 +1052,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (! empty($object->remise)?$object->remise:0)), 0, $outputlangs), 0, 'R', 1);
|
||||
@ -1071,7 +1071,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
else
|
||||
{
|
||||
// FIXME amount of vat not supported with multicurrency
|
||||
|
||||
|
||||
//Local tax 1 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
@ -1141,26 +1141,26 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
//}
|
||||
|
||||
|
||||
// VAT
|
||||
// Situations totals migth be wrong on huge amounts
|
||||
if ($object->situation_cycle_ref && $object->situation_counter > 1) {
|
||||
|
||||
|
||||
$sum_pdf_tva = 0;
|
||||
foreach($this->tva as $tvakey => $tvaval){
|
||||
$sum_pdf_tva+=$tvaval; // sum VAT amounts to compare to object
|
||||
}
|
||||
|
||||
|
||||
if($sum_pdf_tva!=$object->total_tva) { // apply coef to recover the VAT object amount (the good one)
|
||||
$coef_fix_tva = $object->total_tva / $sum_pdf_tva;
|
||||
|
||||
|
||||
foreach($this->tva as $tvakey => $tvaval) {
|
||||
$this->tva[$tvakey]=$tvaval * $coef_fix_tva;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
foreach($this->tva as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
@ -1416,7 +1416,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (empty($hidetop))
|
||||
{
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
|
||||
|
||||
if($this->situationinvoice)
|
||||
{
|
||||
$pdf->MultiCell($this->posxprogress-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
@ -1430,14 +1430,14 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($this->situationinvoice) {
|
||||
$pdf->line($this->posxprogress - 1, $tab_top, $this->posxprogress - 1, $tab_top + $tab_height);
|
||||
|
||||
|
||||
if (empty($hidetop)) {
|
||||
|
||||
|
||||
$pdf->SetXY($this->posxprogress, $tab_top+1);
|
||||
|
||||
|
||||
if($conf->global->PRODUCT_USE_UNITS)
|
||||
{
|
||||
$pdf->MultiCell($this->posxunit-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C');
|
||||
@ -1450,9 +1450,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
$pdf->MultiCell($this->postotalht-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($conf->global->PRODUCT_USE_UNITS) {
|
||||
@ -1573,10 +1573,10 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$textref=$outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref);
|
||||
if ($object->statut == Facture::STATUS_DRAFT)
|
||||
if ($object->statut == Facture::STATUS_DRAFT)
|
||||
{
|
||||
$pdf->SetTextColor(128,0,0);
|
||||
$textref.=' - '.$outputlangs->trans("NotValidated");
|
||||
$textref.=' - '.$outputlangs->transnoentities("NotValidated");
|
||||
}
|
||||
$pdf->MultiCell($w, 4, $textref, '', 'R');
|
||||
|
||||
@ -1635,7 +1635,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("DatePointOfTax")." : " . dol_print_date($object->date_pointoftax,"day",false,$outputlangs), '', 'R');
|
||||
}
|
||||
|
||||
|
||||
if ($object->type != 2)
|
||||
{
|
||||
$posy+=3;
|
||||
@ -1663,10 +1663,10 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy+=4;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($w, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||
$pdf->MultiCell($w, 3, $langs->transnoentities("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posy+=1;
|
||||
|
||||
// Show list of linked objects
|
||||
|
||||
@ -167,7 +167,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0)
|
||||
{
|
||||
// Model for creation
|
||||
@ -252,7 +252,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
if (! is_object($object))
|
||||
{
|
||||
$id = $object;
|
||||
$object = new Propale($this->db);
|
||||
$object = new Propal($this->db);
|
||||
$result=$object->fetch($id);
|
||||
if ($result < 0)
|
||||
{
|
||||
|
||||
@ -492,7 +492,7 @@ if ($resql)
|
||||
|
||||
if (! GETPOST('cancel'))
|
||||
{
|
||||
$objecttmp=new FactureFourn($db);
|
||||
$objecttmp=new FactureFournisseur($db);
|
||||
$listofselectedid=array();
|
||||
$listofselectedthirdparties=array();
|
||||
$listofselectedref=array();
|
||||
|
||||
@ -448,7 +448,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
}
|
||||
|
||||
// Number of supplier invoices (has paid)
|
||||
if (! empty($conf->supplier_invoice->enabled) && ! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
if (! empty($conf->supplier_invoice->enabled) && ! empty($user->rights->fournisseur->facture->lire))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$board=new FactureFournisseur($db);
|
||||
|
||||
@ -611,3 +611,7 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (14
|
||||
-- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT;
|
||||
|
||||
ALTER TABLE llx_import_model MODIFY COLUMN type varchar(50);
|
||||
|
||||
-- Negative buying prices
|
||||
|
||||
UPDATE llx_facturedet SET buy_price_ht = ABS(buy_price_ht)
|
||||
|
||||
@ -117,6 +117,7 @@ SecondApprovalAlreadyDone=Second approval already done
|
||||
SupplierOrderReceivedInDolibarr=Supplier order %s received %s
|
||||
SupplierOrderSubmitedInDolibarr=Supplier order %s submited
|
||||
SupplierOrderClassifiedBilled=Supplier order %s set billed
|
||||
OtherOrders=Other orders
|
||||
##### Types de contacts #####
|
||||
TypeContact_commande_internal_SALESREPFOLL=Representative following-up customer order
|
||||
TypeContact_commande_internal_SHIPPING=Representative following-up shipping
|
||||
|
||||
@ -63,6 +63,7 @@ ProposalLine=Proposal line
|
||||
AvailabilityPeriod=Availability delay
|
||||
SetAvailability=Set availability delay
|
||||
AfterOrder=after order
|
||||
OtherProposals=Other proposals
|
||||
##### Availability #####
|
||||
AvailabilityTypeAV_NOW=Immediate
|
||||
AvailabilityTypeAV_1W=1 week
|
||||
|
||||
@ -69,6 +69,7 @@ NoPredefinedProductToDispatch=No predefined products for this object. So no disp
|
||||
DispatchVerb=Dispatch
|
||||
StockLimitShort=Limit for alert
|
||||
StockLimit=Stock limit for alert
|
||||
StockLimitDesc="" (empty) default value means no alert. <br>"0" can be used with 'Stock can be negative' configuration.
|
||||
PhysicalStock=Physical stock
|
||||
RealStock=Real Stock
|
||||
RealStockDesc=Physical or real stock is the stock you currently have into your internal warehouses/emplacements.
|
||||
@ -192,4 +193,4 @@ InventoryFlushed=Inventory flushed
|
||||
ExitEditMode=Exit edition
|
||||
inventoryDeleteLine=Delete line
|
||||
RegulateStock=Regulate Stock
|
||||
ListInventory=List
|
||||
ListInventory=List
|
||||
@ -129,6 +129,8 @@ class modMyModule extends DolibarrModules
|
||||
// Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1
|
||||
// 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
|
||||
// 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
|
||||
// Can also be: $this->tabs = array('data'=>'...', 'entity'=>0);
|
||||
//
|
||||
// where objecttype can be
|
||||
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
|
||||
// 'contact' to add a tab in contact view
|
||||
|
||||
Loading…
Reference in New Issue
Block a user