Merge branch '6.0' of https://github.com/Dolibarr/dolibarr.git into 6.0_bug
This commit is contained in:
commit
abb7e651d1
@ -2987,7 +2987,16 @@ class ContratLigne extends CommonObjectLine
|
|||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'contratdet');
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'contratdet');
|
||||||
|
|
||||||
// FIXME Missing insert of extrafields
|
// Insert of extrafields
|
||||||
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) // For avoid conflicts if trigger used
|
||||||
|
{
|
||||||
|
$result = $this->insertExtraFields();
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$notrigger)
|
if (!$notrigger)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -50,7 +51,19 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td align="center"><?php echo dol_print_date($objectlink->date_contrat,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($objectlink->date_contrat,'day'); ?></td>
|
||||||
<td align="right"> </td>
|
<td align="right"><?php
|
||||||
|
// Price of contract is not shown by default because a contract is a list of service with
|
||||||
|
// start and end date that change with time andd that may be different that the period of reference for price.
|
||||||
|
// So price of a contract does often means nothing. Prices is on the different invoices done on same contract.
|
||||||
|
if ($user->rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE))
|
||||||
|
{
|
||||||
|
$totalcontrat = 0;
|
||||||
|
foreach ($objectlink->lines as $linecontrat) {
|
||||||
|
$totalcontrat = $totalcontrat + $linecontrat->total_ht;
|
||||||
|
$total = $total + $linecontrat->total_ht;
|
||||||
|
}
|
||||||
|
echo price($totalcontrat);
|
||||||
|
} ?></td>
|
||||||
<td align="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
<td align="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
||||||
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -104,7 +104,7 @@ function dol_hash($chain,$type=0)
|
|||||||
* @param string $features Features to check (it must be module name. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
|
* @param string $features Features to check (it must be module name. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
|
||||||
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
||||||
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
|
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
|
||||||
* @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
|
* @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'level1|level2'.
|
||||||
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
|
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
|
||||||
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
|
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
|
||||||
* @param Canvas $objcanvas Object canvas
|
* @param Canvas $objcanvas Object canvas
|
||||||
|
|||||||
@ -179,7 +179,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
*/
|
*/
|
||||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
|
|||||||
@ -168,7 +168,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
*/
|
*/
|
||||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
|
|||||||
@ -153,7 +153,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
*/
|
*/
|
||||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
|
|||||||
@ -139,7 +139,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
*/
|
*/
|
||||||
function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
|
function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes;
|
||||||
|
|
||||||
// Get source company
|
// Get source company
|
||||||
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
|
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
|
||||||
|
|||||||
@ -154,7 +154,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
*/
|
*/
|
||||||
function write_file($object,$outputlangs='',$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
function write_file($object,$outputlangs='',$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf,$hookmanager,$mysoc;
|
global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
|
|||||||
@ -141,7 +141,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
*/
|
*/
|
||||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user