forked from Wavyzz/dolibarr
FIX #6461
This commit is contained in:
@@ -62,13 +62,12 @@ $origin=GETPOST('origin','alpha');
|
|||||||
$originid=GETPOST('originid','int');
|
$originid=GETPOST('originid','int');
|
||||||
|
|
||||||
$datecontrat='';
|
$datecontrat='';
|
||||||
|
$usehm=(! empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:0);
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'contrat',$id);
|
$result=restrictedArea($user,'contrat',$id);
|
||||||
|
|
||||||
$usehm=(! empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:0);
|
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('contractcard','globalcard'));
|
$hookmanager->initHooks(array('contractcard','globalcard'));
|
||||||
|
|
||||||
@@ -1700,7 +1699,7 @@ else
|
|||||||
if ($object->statut > 0)
|
if ($object->statut > 0)
|
||||||
{
|
{
|
||||||
print '<tr '.$bcnd[$var].'>';
|
print '<tr '.$bcnd[$var].'>';
|
||||||
print '<td colspan="'.($conf->margin->enabled?7:6).'"><hr class="opacitymedium"></td>';
|
print '<td class="tdhrthin" colspan="'.($conf->margin->enabled?7:6).'"><hr class="opacitymedium tdhrthin"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1862,7 +1861,7 @@ else
|
|||||||
print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1);
|
print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center nohover" rowspan="2" valign="middle" class="nohover">';
|
print '<td class="center nohover" rowspan="2" valign="middle" class="nohover">';
|
||||||
print '<input type="submit" class="button" name="activate" value="'.$langs->trans("Activate").'"><br>';
|
print '<input type="submit" class="button" name="activate" value="'.$langs->trans("Activate").'"><br>';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -1917,7 +1916,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right" rowspan="2" class="nohover">';
|
print '<td rowspan="2" class="center nohover">';
|
||||||
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Unactivate").'"><br>';
|
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Unactivate").'"><br>';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@@ -608,7 +608,8 @@ class Contrat extends CommonObject
|
|||||||
$extralabelsline=$extrafieldsline->fetch_name_optionals_label($line->table_element,true);
|
$extralabelsline=$extrafieldsline->fetch_name_optionals_label($line->table_element,true);
|
||||||
|
|
||||||
$this->lines=array();
|
$this->lines=array();
|
||||||
|
$pos = 0;
|
||||||
|
|
||||||
// Selectionne les lignes contrats liees a un produit
|
// Selectionne les lignes contrats liees a un produit
|
||||||
$sql = "SELECT p.label as product_label, p.description as product_desc, p.ref as product_ref,";
|
$sql = "SELECT p.label as product_label, p.description as product_desc, p.ref as product_ref,";
|
||||||
$sql.= " d.rowid, d.fk_contrat, d.statut, d.description, d.price_ht, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.remise_percent, d.subprice, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht,";
|
$sql.= " d.rowid, d.fk_contrat, d.statut, d.description, d.price_ht, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.remise_percent, d.subprice, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht,";
|
||||||
@@ -693,8 +694,8 @@ class Contrat extends CommonObject
|
|||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
$line->fetch_optionals($line->id,$extralabelsline);
|
$line->fetch_optionals($line->id,$extralabelsline);
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
$this->lines[$pos] = $line;
|
||||||
$this->lines_id_index_mapper[$line->id] = $i;
|
$this->lines_id_index_mapper[$line->id] = $pos;
|
||||||
|
|
||||||
//dol_syslog("1 ".$line->desc);
|
//dol_syslog("1 ".$line->desc);
|
||||||
//dol_syslog("2 ".$line->product_desc);
|
//dol_syslog("2 ".$line->product_desc);
|
||||||
@@ -709,6 +710,7 @@ class Contrat extends CommonObject
|
|||||||
$total_ht+=$objp->total_ht;
|
$total_ht+=$objp->total_ht;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
$pos++;
|
||||||
}
|
}
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
}
|
}
|
||||||
@@ -798,14 +800,15 @@ class Contrat extends CommonObject
|
|||||||
$line->fetch_optionals($line->id,$extralabelsline);
|
$line->fetch_optionals($line->id,$extralabelsline);
|
||||||
|
|
||||||
|
|
||||||
$this->lines[] = $line;
|
$this->lines[$pos] = $line;
|
||||||
$this->lines_id_index_mapper[$line->id] = key($this->lines);
|
$this->lines_id_index_mapper[$line->id] = $pos;
|
||||||
|
|
||||||
$total_ttc+=$objp->total_ttc;
|
$total_ttc+=$objp->total_ttc;
|
||||||
$total_vat+=$objp->total_tva;
|
$total_vat+=$objp->total_tva;
|
||||||
$total_ht+=$objp->total_ht;
|
$total_ht+=$objp->total_ht;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
$pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|||||||
@@ -1047,7 +1047,6 @@ div.photoref {
|
|||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.photorefnoborder {
|
img.photorefnoborder {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
@@ -1060,7 +1059,10 @@ img.photorefnoborder {
|
|||||||
.underbanner {
|
.underbanner {
|
||||||
border-bottom: <?php echo $borderwith ?>px solid rgb(<?php echo $colortopbordertitle1 ?>);
|
border-bottom: <?php echo $borderwith ?>px solid rgb(<?php echo $colortopbordertitle1 ?>);
|
||||||
}
|
}
|
||||||
|
.tdhrthin {
|
||||||
|
margin: 0;
|
||||||
|
padding-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Menu top et 1ere ligne tableau */
|
/* Menu top et 1ere ligne tableau */
|
||||||
|
|||||||
@@ -1069,7 +1069,6 @@ div.photoref {
|
|||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.photorefnoborder {
|
img.photorefnoborder {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
@@ -1077,12 +1076,15 @@ img.photorefnoborder {
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
}
|
}
|
||||||
|
|
||||||
.underrefbanner {
|
.underrefbanner {
|
||||||
}
|
}
|
||||||
.underbanner {
|
.underbanner {
|
||||||
border-bottom: <?php echo $borderwith; ?>px solid rgb(<?php echo $colortopbordertitle1 ?>);
|
border-bottom: <?php echo $borderwith; ?>px solid rgb(<?php echo $colortopbordertitle1 ?>);
|
||||||
}
|
}
|
||||||
|
.tdhrthin {
|
||||||
|
margin: 0;
|
||||||
|
padding-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|||||||
Reference in New Issue
Block a user