Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2017-07-21 15:03:21 +02:00
commit 3716645b8b
20 changed files with 130 additions and 92 deletions

View File

@ -355,6 +355,7 @@ if ($resql)
$soc = new Societe($db); $soc = new Societe($db);
$soc->fetch($socid); $soc->fetch($socid);
$title = $langs->trans('ListOfProposals') . ' - '.$soc->name; $title = $langs->trans('ListOfProposals') . ' - '.$soc->name;
if (empty($search_societe)) $search_societe = $soc->name;
} }
else else
{ {

View File

@ -578,6 +578,7 @@ if ($resql)
$soc = new Societe($db); $soc = new Societe($db);
$soc->fetch($socid); $soc->fetch($socid);
$title = $langs->trans('ListOfOrders') . ' - '.$soc->name; $title = $langs->trans('ListOfOrders') . ' - '.$soc->name;
if (empty($search_company)) $search_company = $soc->name;
} }
else else
{ {

View File

@ -531,6 +531,7 @@ if ($resql)
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->fetch($socid); $soc->fetch($socid);
if (empty($search_societe)) $search_societe = $soc->name;
} }
$param='&socid='.$socid; $param='&socid='.$socid;

View File

@ -1633,8 +1633,8 @@ class Contrat extends CommonObject
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options)>0) // For avoid conflicts if trigger used if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options)>0) // For avoid conflicts if trigger used
{ {
$contractline = new ContratLigne($this->db); $contractline = new ContratLigne($this->db);
$contractline->array_options=$array_option; $contractline->array_options=$array_options;
$contractline->id= $this->db->last_insert_id(MAIN_DB_PREFIX.$contractline->table_element); $contractline->id= $rowid;
$result=$contractline->insertExtraFields(); $result=$contractline->insertExtraFields();
if ($result < 0) if ($result < 0)
{ {

View File

@ -305,8 +305,15 @@ if ($resql)
$i = 0; $i = 0;
$arrayofselected=is_array($toselect)?$toselect:array(); $arrayofselected=is_array($toselect)?$toselect:array();
if ($socid > 0)
{
$soc = new Societe($db);
$soc->fetch($socid);
if (empty($search_name)) $search_name = $soc->name;
}
$param=''; $param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sall != '') $param.='&sall='.$sall; if ($sall != '') $param.='&sall='.$sall;

View File

@ -391,6 +391,9 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$object->trackid = $trackid; $object->trackid = $trackid;
$object->fk_element = $object->id; $object->fk_element = $object->id;
$object->elementtype = $object->element; $object->elementtype = $object->element;
if (is_array($attachedfiles) && count($attachedfiles)>0) {
$object->attachedfiles = $attachedfiles;
}
// Call of triggers // Call of triggers
if (! empty($trigger_name)) if (! empty($trigger_name))

View File

@ -5604,6 +5604,14 @@ class Form
{ {
$listofidcompanytoscan=$object->thirdparty->id; $listofidcompanytoscan=$object->thirdparty->id;
if (($object->thirdparty->parent > 0) && ! empty($conf->global->THIRDPARTY_INCLUDE_PARENT_IN_LINKTO)) $listofidcompanytoscan.=','.$object->thirdparty->parent; if (($object->thirdparty->parent > 0) && ! empty($conf->global->THIRDPARTY_INCLUDE_PARENT_IN_LINKTO)) $listofidcompanytoscan.=','.$object->thirdparty->parent;
if (($object->fk_project > 0) && ! empty($conf->global->THIRDPARTY_INCLUDE_PROJECT_THIRDPARY_IN_LINKTO))
{
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$tmpproject=new Project($this->db);
$tmpproject->fetch($object->fk_project);
if ($tmpproject->socid > 0 && ($tmpproject->socid != $object->thirdparty->id)) $listofidcompanytoscan.=','.$tmpproject->socid;
unset($tmpproject);
}
$possiblelinks=array( $possiblelinks=array(
'propal'=>array('enabled'=>$conf->propal->enabled, 'perms'=>1, 'label'=>'LinkToProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('propal').')'), 'propal'=>array('enabled'=>$conf->propal->enabled, 'perms'=>1, 'label'=>'LinkToProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('propal').')'),

View File

@ -271,7 +271,7 @@ class SMTPs
{ {
$this->_moreinheader = $_val; $this->_moreinheader = $_val;
} }
/** /**
* get trackid * get trackid
* *
@ -291,7 +291,7 @@ class SMTPs
{ {
return $this->_moreinheader; return $this->_moreinheader;
} }
/** /**
* Set errors to * Set errors to
* *
@ -411,7 +411,7 @@ class SMTPs
function _server_authenticate() function _server_authenticate()
{ {
global $conf; global $conf;
// Send the RFC2554 specified EHLO. // Send the RFC2554 specified EHLO.
// This improvment as provided by 'SirSir' to // This improvment as provided by 'SirSir' to
// accomodate both SMTP AND ESMTP capable servers // accomodate both SMTP AND ESMTP capable servers
@ -462,7 +462,7 @@ class SMTPs
{ {
$this->_setErr(126, '"' . $host . '" does not support authenticated connections.'); $this->_setErr(126, '"' . $host . '" does not support authenticated connections.');
return $_retVal; return $_retVal;
} }
} }
// Send Authentication to Server // Send Authentication to Server
// Check for errors along the way // Check for errors along the way
@ -903,7 +903,7 @@ class SMTPs
if ( $_strReplyTo ) if ( $_strReplyTo )
$this->_msgReplyTo = $this->_strip_email($_strReplyTo); $this->_msgReplyTo = $this->_strip_email($_strReplyTo);
} }
/** /**
* Retrieves the Address from which mail will be the reply-to * Retrieves the Address from which mail will be the reply-to
* *
@ -913,15 +913,15 @@ class SMTPs
function getReplyTo($_part = true) function getReplyTo($_part = true)
{ {
$_retValue = ''; $_retValue = '';
if ( $_part === true ) if ( $_part === true )
$_retValue = $this->_msgReplyTo; $_retValue = $this->_msgReplyTo;
else else
$_retValue = $this->_msgReplyTo[$_part]; $_retValue = $this->_msgReplyTo[$_part];
return $_retValue; return $_retValue;
} }
/** /**
* Inserts given addresses into structured format. * Inserts given addresses into structured format.
* This method takes a list of given addresses, via an array * This method takes a list of given addresses, via an array
@ -1217,6 +1217,8 @@ class SMTPs
*/ */
function getHeader() function getHeader()
{ {
global $conf;
$_header = 'From: ' . $this->getFrom('org') . "\r\n" $_header = 'From: ' . $this->getFrom('org') . "\r\n"
. 'To: ' . $this->getTO() . "\r\n"; . 'To: ' . $this->getTO() . "\r\n";
@ -1233,13 +1235,13 @@ class SMTPs
if ( $this->getBCC() ) if ( $this->getBCC() )
$_header .= 'Bcc: ' . $this->getBCC() . "\r\n"; $_header .= 'Bcc: ' . $this->getBCC() . "\r\n";
*/ */
$host=$this->getHost(); $host=$this->getHost();
$host=preg_replace('@tcp://@i','',$host); // Remove prefix $host=preg_replace('@tcp://@i','',$host); // Remove prefix
$host=preg_replace('@ssl://@i','',$host); // Remove prefix $host=preg_replace('@ssl://@i','',$host); // Remove prefix
$host=dol_getprefix('email'); $host=dol_getprefix('email');
//NOTE: Message-ID should probably contain the username of the user who sent the msg //NOTE: Message-ID should probably contain the username of the user who sent the msg
$_header .= 'Subject: ' . $this->getSubject() . "\r\n"; $_header .= 'Subject: ' . $this->getSubject() . "\r\n";
$_header .= 'Date: ' . date("r") . "\r\n"; $_header .= 'Date: ' . date("r") . "\r\n";
@ -1258,7 +1260,7 @@ class SMTPs
} }
if ( $this->getMoreInHeader() ) if ( $this->getMoreInHeader() )
$_header .= $this->getMoreInHeader(); // Value must include the "\r\n"; $_header .= $this->getMoreInHeader(); // Value must include the "\r\n";
//$_header .= //$_header .=
// 'Read-Receipt-To: ' . $this->getFrom( 'org' ) . "\r\n" // 'Read-Receipt-To: ' . $this->getFrom( 'org' ) . "\r\n"
// 'Return-Receipt-To: ' . $this->getFrom( 'org' ) . "\r\n"; // 'Return-Receipt-To: ' . $this->getFrom( 'org' ) . "\r\n";
@ -1279,9 +1281,10 @@ class SMTPs
$_header .= "Reply-To: ".$this->getReplyTo('addr') ."\r\n"; $_header .= "Reply-To: ".$this->getReplyTo('addr') ."\r\n";
$_header .= 'X-Mailer: Dolibarr version ' . DOL_VERSION .' (using SMTPs Mailer)' . "\r\n"; $_header .= 'X-Mailer: Dolibarr version ' . DOL_VERSION .' (using SMTPs Mailer)' . "\r\n";
$_header .= 'X-Dolibarr-Option: '.($conf->global->MAIN_MAIL_USE_MULTI_PART?'MAIN_MAIL_USE_MULTI_PART':'No MAIN_MAIL_USE_MULTI_PART') . "\r\n";
$_header .= 'Mime-Version: 1.0' . "\r\n"; $_header .= 'Mime-Version: 1.0' . "\r\n";
return $_header; return $_header;
} }
@ -1310,17 +1313,17 @@ class SMTPs
$strContentAltText = html_entity_decode(strip_tags($strContent)); $strContentAltText = html_entity_decode(strip_tags($strContent));
$strContentAltText = rtrim(wordwrap($strContentAltText, 75, "\r\n")); $strContentAltText = rtrim(wordwrap($strContentAltText, 75, "\r\n"));
} }
// Make RFC2045 Compliant // Make RFC2045 Compliant
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content //$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content
$strContent = rtrim(wordwrap($strContent, 75, "\r\n")); // TODO Using this method creates unexpected line break on text/plain content. $strContent = rtrim(wordwrap($strContent, 75, "\r\n")); // TODO Using this method creates unexpected line break on text/plain content.
$this->_msgContent[$strType] = array(); $this->_msgContent[$strType] = array();
$this->_msgContent[$strType]['mimeType'] = $strMimeType; $this->_msgContent[$strType]['mimeType'] = $strMimeType;
$this->_msgContent[$strType]['data'] = $strContent; $this->_msgContent[$strType]['data'] = $strContent;
$this->_msgContent[$strType]['dataText'] = $strContentAltText; $this->_msgContent[$strType]['dataText'] = $strContentAltText;
if ( $this->getMD5flag() ) if ( $this->getMD5flag() )
$this->_msgContent[$strType]['md5'] = dol_hash($strContent, 3); $this->_msgContent[$strType]['md5'] = dol_hash($strContent, 3);
//} //}
@ -1334,7 +1337,7 @@ class SMTPs
function getBodyContent() function getBodyContent()
{ {
global $conf; global $conf;
// Generate a new Boundary string // Generate a new Boundary string
$this->_setBoundary(); $this->_setBoundary();
@ -1382,7 +1385,7 @@ class SMTPs
$content .= "\r\n"; $content .= "\r\n";
$content .= "--" . $this->_getBoundary('mixed') . "\r\n"; $content .= "--" . $this->_getBoundary('mixed') . "\r\n";
if (key_exists('image', $this->_msgContent)) // If inline image found if (key_exists('image', $this->_msgContent)) // If inline image found
{ {
$content.= 'Content-Type: multipart/alternative; boundary="'.$this->_getBoundary('alternative').'"' . "\r\n"; $content.= 'Content-Type: multipart/alternative; boundary="'.$this->_getBoundary('alternative').'"' . "\r\n";
@ -1390,7 +1393,7 @@ class SMTPs
$content .= "--" . $this->_getBoundary('alternative') . "\r\n"; $content .= "--" . $this->_getBoundary('alternative') . "\r\n";
} }
// $this->_msgContent must be sorted with key 'text' or 'html' first then 'image' then 'attachment' // $this->_msgContent must be sorted with key 'text' or 'html' first then 'image' then 'attachment'
@ -1450,18 +1453,18 @@ class SMTPs
$content.= "\r\n"; $content.= "\r\n";
$content.= "--" . $this->_getBoundary('related') . "\r\n"; $content.= "--" . $this->_getBoundary('related') . "\r\n";
} }
if (! key_exists('image', $this->_msgContent) && $_content['dataText'] && ! empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) // Add plain text message part before html part if (! key_exists('image', $this->_msgContent) && $_content['dataText'] && ! empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) // Add plain text message part before html part
{ {
$content.= 'Content-Type: multipart/alternative; boundary="'.$this->_getBoundary('alternative').'"' . "\r\n"; $content.= 'Content-Type: multipart/alternative; boundary="'.$this->_getBoundary('alternative').'"' . "\r\n";
$content .= "\r\n"; $content .= "\r\n";
$content .= "--" . $this->_getBoundary('alternative') . "\r\n"; $content .= "--" . $this->_getBoundary('alternative') . "\r\n";
$content.= "Content-Type: text/plain; charset=" . $this->getCharSet() . "\r\n"; $content.= "Content-Type: text/plain; charset=" . $this->getCharSet() . "\r\n";
$content.= "\r\n". $_content['dataText'] . "\r\n"; $content.= "\r\n". $_content['dataText'] . "\r\n";
$content.= "--" . $this->_getBoundary('alternative') . "\r\n"; $content.= "--" . $this->_getBoundary('alternative') . "\r\n";
} }
$content .= 'Content-Type: ' . $_content['mimeType'] . '; ' $content .= 'Content-Type: ' . $_content['mimeType'] . '; '
// . 'charset="' . $this->getCharSet() . '"'; // . 'charset="' . $this->getCharSet() . '"';
. 'charset=' . $this->getCharSet() . ''; . 'charset=' . $this->getCharSet() . '';
@ -1483,7 +1486,7 @@ class SMTPs
{ {
$content.= "--" . $this->_getBoundary('alternative') . "--". "\r\n"; $content.= "--" . $this->_getBoundary('alternative') . "--". "\r\n";
} }
$content .= "\r\n"; $content .= "\r\n";
} }
} }

View File

@ -45,28 +45,28 @@ class pdf_einstein extends ModelePDFCommandes
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.3 = array(5, 3) * e.g.: PHP ≥ 5.3 = array(5, 3)
*/ */
public $phpmin = array(5, 2); public $phpmin = array(5, 2);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
@ -240,11 +240,11 @@ class pdf_einstein extends ModelePDFCommandes
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$pdf->SetAutoPageBreak(1,0); $pdf->SetAutoPageBreak(1,0);
$heightforinfotot = 40; // Height reserved to output the info and total part $heightforinfotot = 40; // Height reserved to output the info and total 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 $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) $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (class_exists('TCPDF')) if (class_exists('TCPDF'))
{ {
$pdf->setPrintHeader(false); $pdf->setPrintHeader(false);
@ -263,10 +263,10 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetDrawColor(128,128,128); $pdf->SetDrawColor(128,128,128);
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
$pdf->SetSubject($outputlangs->transnoentities("Order")); $pdf->SetSubject($outputlangs->transnoentities("PdfOrderTitle"));
$pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetCreator("Dolibarr ".DOL_VERSION);
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $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("PdfOrderTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
@ -317,16 +317,16 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($desc_incoterms), 0, 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
$height_incoterms=$nexY-$tab_top; $height_incoterms=$nexY-$tab_top;
// Rect prend une longueur en 3eme param // Rect prend une longueur en 3eme param
$pdf->SetDrawColor(192,192,192); $pdf->SetDrawColor(192,192,192);
$pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1);
$tab_top = $nexY+6; $tab_top = $nexY+6;
$height_incoterms += 4; $height_incoterms += 4;
} }
} }
// Affiche notes // Affiche notes
$notetoshow=empty($object->note_public)?'':$object->note_public; $notetoshow=empty($object->note_public)?'':$object->note_public;
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
@ -478,7 +478,7 @@ class pdf_einstein extends ModelePDFCommandes
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva; else $tvaligne=$object->lines[$i]->total_tva;
$localtax1ligne=$object->lines[$i]->total_localtax1; $localtax1ligne=$object->lines[$i]->total_localtax1;
$localtax2ligne=$object->lines[$i]->total_localtax2; $localtax2ligne=$object->lines[$i]->total_localtax2;
$localtax1_rate=$object->lines[$i]->localtax1_tx; $localtax1_rate=$object->lines[$i]->localtax1_tx;
@ -585,7 +585,7 @@ class pdf_einstein extends ModelePDFCommandes
$posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs); $posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs);
} }
*/ */
// Pied de page // Pied de page
$this->_pagefoot($pdf,$object,$outputlangs); $this->_pagefoot($pdf,$object,$outputlangs);
if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages(); if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages();
@ -1201,7 +1201,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param string $titlekey Translation key to show as title of document * @param string $titlekey Translation key to show as title of document
* @return void * @return void
*/ */
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="Order") function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="PdfOrderTitle")
{ {
global $conf,$langs,$hookmanager; global $conf,$langs,$hookmanager;
@ -1294,7 +1294,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->MultiCell(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); $pdf->MultiCell(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
} }
} }
$posy+=2; $posy+=2;
// Show list of linked objects // Show list of linked objects

View File

@ -255,16 +255,16 @@ class pdf_crabe extends ModelePDFFactures
// Set nblignes with the new facture lines content after hook // Set nblignes with the new facture lines content after hook
$nblignes = count($object->lines); $nblignes = count($object->lines);
$nbpayments = count($object->getListOfPayments()); $nbpayments = count($object->getListOfPayments());
// Create pdf instance // Create pdf instance
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$pdf->SetAutoPageBreak(1,0); $pdf->SetAutoPageBreak(1,0);
$heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part $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 $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) $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if (class_exists('TCPDF')) if (class_exists('TCPDF'))
{ {
$pdf->setPrintHeader(false); $pdf->setPrintHeader(false);
@ -284,10 +284,10 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetDrawColor(128,128,128); $pdf->SetDrawColor(128,128,128);
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
$pdf->SetSubject($outputlangs->transnoentities("Invoice")); $pdf->SetSubject($outputlangs->transnoentities("PdfInvoiceTitle"));
$pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetCreator("Dolibarr ".DOL_VERSION);
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Invoice")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
@ -509,7 +509,7 @@ class pdf_crabe extends ModelePDFFactures
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxqty, $curY); $pdf->SetXY($this->posxqty, $curY);
// Enough for 6 chars // Enough for 6 chars
if ($this->situationinvoice) if ($this->situationinvoice)
{ {
$pdf->MultiCell($this->posxprogress-$this->posxqty-0.8, 4, $qty, 0, 'R'); $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); $pdf->SetFont('','', $default_font_size - 4);
// Loop on each deposits and credit notes included // Loop on each deposits and credit notes included
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
$sql.= " re.description, re.fk_facture_source,"; $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 = ".$object->id;
//$sql.= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = 1"; //$sql.= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = 1";
$sql.= " ORDER BY p.datep"; $sql.= " ORDER BY p.datep";
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
@ -1052,7 +1052,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFillColor(255,255,255); $pdf->SetFillColor(255,255,255);
$pdf->SetXY($col1x, $tab2_top + 0); $pdf->SetXY($col1x, $tab2_top + 0);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); $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); $total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$pdf->SetXY($col2x, $tab2_top + 0); $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); $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 else
{ {
// FIXME amount of vat not supported with multicurrency // FIXME amount of vat not supported with multicurrency
//Local tax 1 before VAT //Local tax 1 before VAT
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //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 // VAT
// Situations totals migth be wrong on huge amounts // Situations totals migth be wrong on huge amounts
if ($object->situation_cycle_ref && $object->situation_counter > 1) { if ($object->situation_cycle_ref && $object->situation_counter > 1) {
$sum_pdf_tva = 0; $sum_pdf_tva = 0;
foreach($this->tva as $tvakey => $tvaval){ foreach($this->tva as $tvakey => $tvaval){
$sum_pdf_tva+=$tvaval; // sum VAT amounts to compare to object $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) 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; $coef_fix_tva = $object->total_tva / $sum_pdf_tva;
foreach($this->tva as $tvakey => $tvaval) { foreach($this->tva as $tvakey => $tvaval) {
$this->tva[$tvakey]=$tvaval * $coef_fix_tva; $this->tva[$tvakey]=$tvaval * $coef_fix_tva;
} }
} }
} }
foreach($this->tva as $tvakey => $tvaval) foreach($this->tva as $tvakey => $tvaval)
{ {
if ($tvakey != 0) // On affiche pas taux 0 if ($tvakey != 0) // On affiche pas taux 0
@ -1416,7 +1416,7 @@ class pdf_crabe extends ModelePDFFactures
if (empty($hidetop)) if (empty($hidetop))
{ {
$pdf->SetXY($this->posxqty-1, $tab_top+1); $pdf->SetXY($this->posxqty-1, $tab_top+1);
if($this->situationinvoice) if($this->situationinvoice)
{ {
$pdf->MultiCell($this->posxprogress-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); $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'); $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
} }
} }
if ($this->situationinvoice) { if ($this->situationinvoice) {
$pdf->line($this->posxprogress - 1, $tab_top, $this->posxprogress - 1, $tab_top + $tab_height); $pdf->line($this->posxprogress - 1, $tab_top, $this->posxprogress - 1, $tab_top + $tab_height);
if (empty($hidetop)) { if (empty($hidetop)) {
$pdf->SetXY($this->posxprogress, $tab_top+1); $pdf->SetXY($this->posxprogress, $tab_top+1);
if($conf->global->PRODUCT_USE_UNITS) if($conf->global->PRODUCT_USE_UNITS)
{ {
$pdf->MultiCell($this->posxunit-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); $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'); $pdf->MultiCell($this->postotalht-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C');
} }
} }
} }
if($conf->global->PRODUCT_USE_UNITS) { if($conf->global->PRODUCT_USE_UNITS) {
@ -1559,7 +1559,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFont('','B', $default_font_size + 3); $pdf->SetFont('','B', $default_font_size + 3);
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
$title=$outputlangs->transnoentities("Invoice"); $title=$outputlangs->transnoentities("PdfInvoiceTitle");
if ($object->type == 1) $title=$outputlangs->transnoentities("InvoiceReplacement"); if ($object->type == 1) $title=$outputlangs->transnoentities("InvoiceReplacement");
if ($object->type == 2) $title=$outputlangs->transnoentities("InvoiceAvoir"); if ($object->type == 2) $title=$outputlangs->transnoentities("InvoiceAvoir");
if ($object->type == 3) $title=$outputlangs->transnoentities("InvoiceDeposit"); if ($object->type == 3) $title=$outputlangs->transnoentities("InvoiceDeposit");
@ -1573,7 +1573,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
$textref=$outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref); $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); $pdf->SetTextColor(128,0,0);
$textref.=' - '.$outputlangs->trans("NotValidated"); $textref.=' - '.$outputlangs->trans("NotValidated");
@ -1635,7 +1635,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("DatePointOfTax")." : " . dol_print_date($object->date_pointoftax,"day",false,$outputlangs), '', 'R'); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("DatePointOfTax")." : " . dol_print_date($object->date_pointoftax,"day",false,$outputlangs), '', 'R');
} }
if ($object->type != 2) if ($object->type != 2)
{ {
$posy+=3; $posy+=3;
@ -1666,7 +1666,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->MultiCell($w, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); $pdf->MultiCell($w, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
} }
} }
$posy+=1; $posy+=1;
// Show list of linked objects // Show list of linked objects

View File

@ -273,7 +273,7 @@ class pdf_azur extends ModelePDFPropales
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
$pdf->SetAutoPageBreak(1,0); $pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF')) if (class_exists('TCPDF'))
{ {
$pdf->setPrintHeader(false); $pdf->setPrintHeader(false);
@ -292,10 +292,10 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetDrawColor(128,128,128); $pdf->SetDrawColor(128,128,128);
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
$pdf->SetSubject($outputlangs->transnoentities("CommercialProposal")); $pdf->SetSubject($outputlangs->transnoentities("PdfCommercialProposalTitle"));
$pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetCreator("Dolibarr ".DOL_VERSION);
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("CommercialProposal")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfCommercialProposalTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
@ -322,19 +322,19 @@ class pdf_azur extends ModelePDFPropales
$pdf->AddPage(); $pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
$pagenb++; $pagenb++;
$heightforinfotot = 40; // Height reserved to output the info and total part $heightforinfotot = 40; // Height reserved to output the info and total part
$heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE)?(pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature"))+10):0; $heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE)?(pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature"))+10):0;
$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 $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) $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit; //print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
$this->_pagehead($pdf, $object, 1, $outputlangs); $this->_pagehead($pdf, $object, 1, $outputlangs);
$pdf->SetFont('','', $default_font_size - 1); $pdf->SetFont('','', $default_font_size - 1);
$pdf->MultiCell(0, 3, ''); // Set interline to 3 $pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0,0,0); $pdf->SetTextColor(0,0,0);
$tab_top = 90; $tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10); $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10);
$tab_height = 130; $tab_height = 130;
@ -383,7 +383,7 @@ class pdf_azur extends ModelePDFPropales
$notetoshow.='Affaire suivi par '.$tmpuser->getFullName($langs); $notetoshow.='Affaire suivi par '.$tmpuser->getFullName($langs);
if ($tmpuser->email) $notetoshow.=', Mail: '.$tmpuser->email; if ($tmpuser->email) $notetoshow.=', Mail: '.$tmpuser->email;
if ($tmpuser->office_phone) $notetoshow.=', Tel: '.$tmpuser->office_phone; if ($tmpuser->office_phone) $notetoshow.=', Tel: '.$tmpuser->office_phone;
} }
if ($notetoshow) if ($notetoshow)
{ {
$tab_top = 88 + $height_incoterms; $tab_top = 88 + $height_incoterms;
@ -452,7 +452,7 @@ class pdf_azur extends ModelePDFPropales
$curX = $this->posxdesc-1; $curX = $this->posxdesc-1;
$showpricebeforepagebreak=1; $showpricebeforepagebreak=1;
$pdf->startTransaction(); $pdf->startTransaction();
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc); pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc);
$pageposafter=$pdf->getPage(); $pageposafter=$pdf->getPage();
@ -554,14 +554,14 @@ class pdf_azur extends ModelePDFPropales
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva; else $tvaligne=$object->lines[$i]->total_tva;
$localtax1ligne=$object->lines[$i]->total_localtax1; $localtax1ligne=$object->lines[$i]->total_localtax1;
$localtax2ligne=$object->lines[$i]->total_localtax2; $localtax2ligne=$object->lines[$i]->total_localtax2;
$localtax1_rate=$object->lines[$i]->localtax1_tx; $localtax1_rate=$object->lines[$i]->localtax1_tx;
$localtax2_rate=$object->lines[$i]->localtax2_tx; $localtax2_rate=$object->lines[$i]->localtax2_tx;
$localtax1_type=$object->lines[$i]->localtax1_type; $localtax1_type=$object->lines[$i]->localtax1_type;
$localtax2_type=$object->lines[$i]->localtax2_type; $localtax2_type=$object->lines[$i]->localtax2_type;
if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100; if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100;
if ($object->remise_percent) $localtax1ligne-=($localtax1ligne*$object->remise_percent)/100; if ($object->remise_percent) $localtax1ligne-=($localtax1ligne*$object->remise_percent)/100;
if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100; if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100;
@ -669,7 +669,7 @@ class pdf_azur extends ModelePDFPropales
{ {
$posy=$this->_signature_area($pdf, $object, $posy, $outputlangs); $posy=$this->_signature_area($pdf, $object, $posy, $outputlangs);
} }
// Pied de page // Pied de page
$this->_pagefoot($pdf,$object,$outputlangs); $this->_pagefoot($pdf,$object,$outputlangs);
if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages(); if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages();
@ -1428,7 +1428,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetFont('','B',$default_font_size + 3); $pdf->SetFont('','B',$default_font_size + 3);
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
$title=$outputlangs->transnoentities("CommercialProposal"); $title=$outputlangs->transnoentities("PdfCommercialProposalTitle");
$pdf->MultiCell(100, 4, $title, '', 'R'); $pdf->MultiCell(100, 4, $title, '', 'R');
$pdf->SetFont('','B',$default_font_size); $pdf->SetFont('','B',$default_font_size);
@ -1481,7 +1481,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); $pdf->MultiCell(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
} }
} }
$posy+=2; $posy+=2;
// Show list of linked objects // Show list of linked objects

View File

@ -249,8 +249,15 @@ $sql.= $db->plimit($limit+1, $offset);
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($result);
if ($socid > 0)
{
$soc = new Societe($db);
$soc->fetch($socid);
if (empty($search_company)) $search_company = $soc->name;
}
$arrayofselected=is_array($toselect)?$toselect:array(); $arrayofselected=is_array($toselect)?$toselect:array();
$param=''; $param='';

View File

@ -427,6 +427,7 @@ if ($resql)
{ {
$soc = new Societe($db); $soc = new Societe($db);
$soc->fetch($socid); $soc->fetch($socid);
if (empty($search_societe)) $search_societe = $soc->name;
} }
$param='&socid='.$socid; $param='&socid='.$socid;

View File

@ -547,4 +547,6 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178,
-- VMYSQL4.1 ALTER TABLE llx_establishment CHANGE COLUMN fk_user_mod fk_user_mod integer NULL; -- VMYSQL4.1 ALTER TABLE llx_establishment CHANGE COLUMN fk_user_mod fk_user_mod integer NULL;
-- VPGSQL8.2 ALTER TABLE llx_establishment ALTER COLUMN fk_user_mod DROP NOT NULL; -- VPGSQL8.2 ALTER TABLE llx_establishment ALTER COLUMN fk_user_mod DROP NOT NULL;
ALTER TABLE llx_multicurrency_rate ADD COLUMN entity integer DEFAULT 1; ALTER TABLE llx_multicurrency_rate ADD COLUMN entity integer DEFAULT 1;
ALTER TABLE llx_user MODIFY COLUMN login varchar(50);

View File

@ -33,7 +33,7 @@ create table llx_user
tms timestamp, tms timestamp,
fk_user_creat integer, fk_user_creat integer,
fk_user_modif integer, fk_user_modif integer,
login varchar(24) NOT NULL, login varchar(50) NOT NULL,
pass varchar(128), pass varchar(128),
pass_crypted varchar(128), pass_crypted varchar(128),
pass_temp varchar(128), -- temporary password when asked for forget password pass_temp varchar(128), -- temporary password when asked for forget password

View File

@ -45,6 +45,7 @@ InvoiceHasAvoir=Was source of one or several credit notes
CardBill=Invoice card CardBill=Invoice card
PredefinedInvoices=Predefined Invoices PredefinedInvoices=Predefined Invoices
Invoice=Invoice Invoice=Invoice
PdfInvoiceTitle=Invoice
Invoices=Invoices Invoices=Invoices
InvoiceLine=Invoice line InvoiceLine=Invoice line
InvoiceCustomer=Customer invoice InvoiceCustomer=Customer invoice

View File

@ -4,6 +4,7 @@ SuppliersOrdersArea=Suppliers orders area
OrderCard=Order card OrderCard=Order card
OrderId=Order Id OrderId=Order Id
Order=Order Order=Order
PdfOrderTitle=Order
Orders=Orders Orders=Orders
OrderLine=Order line OrderLine=Order line
OrderDate=Order date OrderDate=Order date

View File

@ -6,6 +6,7 @@ ProposalsDraft=Draft commercial proposals
ProposalsOpened=Open commercial proposals ProposalsOpened=Open commercial proposals
Prop=Commercial proposals Prop=Commercial proposals
CommercialProposal=Commercial proposal CommercialProposal=Commercial proposal
PdfCommercialProposalTitle=Commercial proposal
ProposalCard=Proposal card ProposalCard=Proposal card
NewProp=New commercial proposal NewProp=New commercial proposal
NewPropal=New proposal NewPropal=New proposal

View File

@ -76,7 +76,7 @@ ThisWillAlsoAddPaymentOnInvoice=Ceci créera également les paiements sur les fa
StatisticsByLineStatus=Statistiques par statut des lignes StatisticsByLineStatus=Statistiques par statut des lignes
RUM=RUM RUM=RUM
RUMLong=Référence Unique de Mandat RUMLong=Référence Unique de Mandat
RUMWillBeGenerated=Le numéro de RUM sera généré une fois les informations de compte bancaire sont enregistrées RUMWillBeGenerated=Si vide le numéro de RUM sera généré une fois les informations de compte bancaire sont enregistrées
WithdrawMode=Mode de prélévement (FRST ou RECUR) WithdrawMode=Mode de prélévement (FRST ou RECUR)
WithdrawRequestAmount=Montant de la demande de prélèvement WithdrawRequestAmount=Montant de la demande de prélèvement
WithdrawRequestErrorNilAmount=Impossible de créer une demande de prélèvement pour un montant nul WithdrawRequestErrorNilAmount=Impossible de créer une demande de prélèvement pour un montant nul

View File

@ -204,7 +204,8 @@ if (empty($reshook))
$account->proprio = GETPOST('proprio','alpha'); $account->proprio = GETPOST('proprio','alpha');
$account->owner_address = GETPOST('owner_address','alpha'); $account->owner_address = GETPOST('owner_address','alpha');
$account->frstrecur = GETPOST('frstrecur'); $account->frstrecur = GETPOST('frstrecur');
$account->rum = GETPOST('rum','alpha');
// This test can be done only once properties were set // This test can be done only once properties were set
if ($account->needIBAN() == 1) if ($account->needIBAN() == 1)
{ {
@ -868,7 +869,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
// RUM // RUM
print '<tr><td class="titlefieldcreate">'.$langs->trans("RUM").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("RUM").'</td>';
print '<td>'.$langs->trans("RUMWillBeGenerated").'</td></tr>'; print '<td colspan="4"><input size="30" type="text" name="rum" value="'.dol_escape_htmltag($account->rum).'"><br>'.$langs->trans("RUMWillBeGenerated").'</td></tr>';
print '<tr><td>'.$langs->trans("WithdrawMode").'</td><td>'; print '<tr><td>'.$langs->trans("WithdrawMode").'</td><td>';
$tblArraychoice = array("FRST" => $langs->trans("FRST"), "RECUR" => $langs->trans("RECUR")); $tblArraychoice = array("FRST" => $langs->trans("FRST"), "RECUR" => $langs->trans("RECUR"));