Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
hermes.bdcloud.fr /
core /
tpl /
Delete
Unzip
Name
Size
Permission
Date
Action
ajax
[ DIR ]
drwxr-xr-x
2025-11-08 11:17
README
123
B
-rw-r--r--
2020-10-31 14:38
admin_extrafields_add.tpl.php
14.86
KB
-rw-r--r--
2020-10-31 14:38
admin_extrafields_edit.tpl.php
17.43
KB
-rw-r--r--
2020-10-31 14:38
admin_extrafields_view.tpl.php
5.82
KB
-rw-r--r--
2020-10-31 14:38
advtarget.tpl.php
23.55
KB
-rw-r--r--
2020-10-31 14:38
ajaxrow.tpl.php
4.84
KB
-rw-r--r--
2020-10-31 14:38
bloc_comment.tpl.php
5.35
KB
-rw-r--r--
2020-10-31 14:38
bloc_showhide.tpl.php
3.17
KB
-rw-r--r--
2020-10-31 14:38
card_presend.tpl.php
10.36
KB
-rw-r--r--
2020-10-31 14:38
commonfields_add.tpl.php
2.27
KB
-rw-r--r--
2020-10-31 14:38
commonfields_edit.tpl.php
2.44
KB
-rw-r--r--
2020-10-31 14:38
commonfields_view.tpl.php
3.94
KB
-rw-r--r--
2020-10-31 14:38
contacts.tpl.php
12.48
KB
-rw-r--r--
2020-10-31 14:38
document_actions_post_headers.tpl.php
4.35
KB
-rw-r--r--
2020-10-31 14:38
error.tpl.php
779
B
-rw-r--r--
2020-10-31 14:38
extrafields_add.tpl.php
1.63
KB
-rw-r--r--
2020-10-31 14:38
extrafields_edit.tpl.php
1.56
KB
-rw-r--r--
2020-10-31 14:38
extrafields_list_print_fields.tpl.php
2.76
KB
-rw-r--r--
2020-10-31 14:38
extrafields_list_search_input.tpl.php
2.95
KB
-rw-r--r--
2020-10-31 14:38
extrafields_list_search_param.tpl.php
699
B
-rw-r--r--
2020-10-31 14:38
extrafields_list_search_sql.tpl.php
2.19
KB
-rw-r--r--
2020-10-31 14:38
extrafields_list_search_title.tpl.php
1.88
KB
-rw-r--r--
2020-10-31 14:38
extrafields_view.tpl.php
10.94
KB
-rw-r--r--
2020-10-31 14:38
filemanager.tpl.php
8.37
KB
-rw-r--r--
2020-10-31 14:38
footer.tpl.php
779
B
-rw-r--r--
2020-10-31 14:38
header.tpl.php
787
B
-rw-r--r--
2020-10-31 14:38
index.html
0
B
-rw-r--r--
2020-10-31 14:38
list_print_total.tpl.php
844
B
-rw-r--r--
2020-10-31 14:38
login.tpl.php
15.08
KB
-rw-r--r--
2020-10-31 14:38
massactions_pre.tpl.php
6.93
KB
-rw-r--r--
2020-10-31 14:38
notes.tpl.php
5.46
KB
-rw-r--r--
2020-10-31 14:38
object_discounts.tpl.php
5.37
KB
-rw-r--r--
2020-10-31 14:38
objectline_create.tpl.php
36.24
KB
-rw-r--r--
2020-10-31 14:38
objectline_edit.tpl.php
16.34
KB
-rw-r--r--
2020-10-31 14:38
objectline_title.tpl.php
5.98
KB
-rw-r--r--
2020-11-30 13:30
objectline_title.tpl.php_OLD
5.51
KB
-rw-r--r--
2020-10-31 14:38
objectline_view.tpl.php
26.49
KB
-rw-r--r--
2020-11-30 13:30
objectline_view.tpl.php_NEW
25.56
KB
-rw-r--r--
2020-10-31 15:06
objectline_view.tpl.php_OLD
22.22
KB
-rw-r--r--
2020-11-16 11:03
onlinepaymentlinks.tpl.php
7.69
KB
-rw-r--r--
2020-10-31 14:38
originproductline.tpl.php
2
KB
-rw-r--r--
2020-10-31 14:38
passwordforgotten.tpl.php
9.75
KB
-rw-r--r--
2020-10-31 14:38
resource_add.tpl.php
1.86
KB
-rw-r--r--
2020-10-31 14:38
resource_view.tpl.php
3.76
KB
-rw-r--r--
2020-10-31 14:38
Save
Rename
<?php /* Copyright (C) 2010-2013 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012-2013 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) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2017 Juanjo Menent <jmenent@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 * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * * Need to have following variables defined: * $object (invoice, order, ...) * $conf * $langs * $dateSelector * $forceall (0 by default, 1 for supplier invoices/orders) * $element (used to test $user->rights->$element->creer) * $permtoedit (used to replace test $user->rights->$element->creer) * $senderissupplier (0 by default, 1 for supplier invoices/orders) * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) * $outputalsopricetotalwithtax * $usemargins (0 to disable all margins columns, 1 to show according to margin setup) * $object_rights->creer initialized from = $object->getRights() * $disableedit, $disablemove, $disableremove * * $text, $description, $line */ // Protection to avoid direct call of template if (empty($object) || !is_object($object)) { print "Error, template page can't be called as URL"; exit; } global $mysoc; global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax; $usemargins = 0; if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) $usemargins = 1; if (empty($dateSelector)) $dateSelector = 0; if (empty($forceall)) $forceall = 0; if (empty($senderissupplier)) $senderissupplier = 0; if (empty($inputalsopricewithtax)) $inputalsopricewithtax = 0; if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax = 0; // add html5 elements $domData = ' data-element="'.$line->element.'"'; $domData .= ' data-id="'.$line->id.'"'; $domData .= ' data-qty="'.$line->qty.'"'; $domData .= ' data-product_type="'.$line->product_type.'"'; $coldisplay = 0; ?> <!-- BEGIN PHP TEMPLATE objectline_view.tpl.php --> <script> var IdsArray = []; var IdsArray2 = []; window.onfocusin = e =>{ //--------------------------------------------- console.log("focused"); var x = e.target; if(x.getAttribute("id").startsWith("module_line_")) { var add = true; // check if the ID exists inside the array for(var i=0; i<IdsArray.length; i++) { if(IdsArray[i] == x.getAttribute("id")) { add = false; } } if(add) { IdsArray.push(x.getAttribute("id")); } console.dir(IdsArray); var elem = document.getElementById("unitpriceupdate"); if(elem) {} else { var div = document.createElement("div"); div.setAttribute("class","inline-block divButAction"); var a = document.createElement("a"); a.setAttribute("class","butAction"); a.setAttribute("id","unitpriceupdate"); a.innerHTML = "Modifier Prix d'unité"; div.appendChild(a); document.getElementsByClassName("tabsAction")[0].appendChild(div); } } //-------------- //Amien Price Achat OnFocus var x2 = e.target; if(x2.getAttribute("id").startsWith("module_revient_")) { var add = true; // check if the ID exists inside the array for(var i=0; i<IdsArray2.length; i++) { if(IdsArray2[i] == x2.getAttribute("id")) { add = false; } } if(add) { IdsArray2.push(x2.getAttribute("id")); } console.dir(IdsArray2); var elem2 = document.getElementById("revientpriceupdate"); if(elem2) {} else { var div = document.createElement("div"); div.setAttribute("class","inline-block divButAction"); var a = document.createElement("a"); a.setAttribute("class","butAction"); a.setAttribute("id","revientpriceupdate"); a.innerHTML = "Modifier Prix de revient"; div.appendChild(a); document.getElementsByClassName("tabsAction")[0].appendChild(div); } } }; window.onclick = e =>{ var x = e.target; if(x.getAttribute("id") == "revientpriceupdate") { var price = ""; var price2 = ""; var facid = ""; var lineid = ""; var totalunits = ""; var dataqty = ""; var ext_det1 = ""; var lineqty = ""; var reduction = ""; //if((IdsArray.length>0) || (IdsArray2.length>0)){ //console.log("tab 1 : "+IdsArray+" - tab 2 : ".IdsArray2) //Amine Price Unite modification for(var i=0;i<IdsArray2.length;i++) { //console.log(">>> i::"+i+" , IdsArray.length::"+IdsArray.length); price = document.getElementById(IdsArray2[i]).value; console.log("###################"); console.log("Price A :" + price + " - Line :"+i); console.log("###################"); facid = IdsArray2[i].split("_"); lineid = facid[2]; facid = facid[3]; var fullstr = document.getElementById("module_lineinput_"+lineid+"_"+facid).value; //alert("module_lineinput_"+lineid+"_"+facid) var fullstrArray = fullstr.split("#"); //alert(fullstr); fullstrArray = fullstrArray[1].split("_"); totalunits = 1; dataqty = 1; ext_det1 = fullstrArray[4]; lineqty = fullstrArray[5]; reduction = fullstrArray[6]; console.log("fullstrArray ::: "+fullstrArray[1]); console.log("price:"+price) console.log("lineid:"+lineid) console.log("facid:"+facid) console.log("totalunits:"+totalunits) console.log("dataqty:"+dataqty) console.log("ext_det1:"+ext_det1) console.log("lineqty:"+lineqty) console.log("reduction:"+reduction) $.post('updaterevientprice.php' , { price:price, lineid:lineid, facid:facid, totalunits:totalunits, dataqty:dataqty, ext_det1:ext_det1, lineqty:lineqty, reduction:reduction, current_counter:i, total_lines:IdsArray2.length } , function(data,status){ //alert(price); if(data=="") { } else { if(data == "reload") { location.href = "/compta/facture/card.php?facid=<?php print $object->id; ?>&arrow_row="+lineid; } else { alert("ERR: :: "+data); } } }); //-------------------------------------------------------------- //-------------------------------------------------------------- //-------------------------------------------------------------- } } if(x.getAttribute("id") == "unitpriceupdate") { var price = ""; var facid = ""; var lineid = ""; var totalunits = ""; var dataqty = ""; var ext_det1 = ""; var lineqty = ""; var reduction = ""; for(var i=0;i<IdsArray.length;i++) { //console.log(">>> i::"+i+" , IdsArray.length::"+IdsArray.length); price = document.getElementById(IdsArray[i]).value; console.log(IdsArray[i]+ " " + price); facid = IdsArray[i].split("_"); lineid = facid[2]; facid = facid[3]; var fullstr = document.getElementById("module_lineinput_"+lineid+"_"+facid).value; //alert("module_lineinput_"+lineid+"_"+facid) var fullstrArray = fullstr.split("#"); //alert(fullstr); fullstrArray = fullstrArray[1].split("_"); totalunits = 1; dataqty = 1; ext_det1 = fullstrArray[4]; lineqty = fullstrArray[5]; reduction = fullstrArray[6]; console.log("fullstrArray ::: "+fullstrArray[1]); console.log("price:"+price) console.log("lineid:"+lineid) console.log("facid:"+facid) console.log("totalunits:"+totalunits) console.log("dataqty:"+dataqty) console.log("ext_det1:"+ext_det1) console.log("lineqty:"+lineqty) console.log("reduction:"+reduction) $.post('updateunitprice.php' , { price:price, lineid:lineid, facid:facid, totalunits:totalunits, dataqty:dataqty, ext_det1:ext_det1, lineqty:lineqty, reduction:reduction, current_counter:i, total_lines:IdsArray.length } , function(data,status){ //alert(data); if(data=="") { } else { if(data == "reload") { location.href = "/compta/facture/card.php?facid=<?php print $object->id; ?>&arrow_row="+lineid; } else { alert("ERR: :: "+data); } } }); } } }; </script> <tr id="row-<?php print $line->id?>" class="drag drop oddeven" <?php print $domData; ?> > <?php if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?> <td class="linecolnum center"><?php $coldisplay++; ?><?php print ($i + 1); ?></td> <?php } ?> <td class="linecoldescription minwidth300imp"><?php $coldisplay++; ?><div id="line_<?php print $line->id; ?>"></div> <?php if (($line->info_bits & 2) == 2) { print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid.'">'; $txt = ''; print img_object($langs->trans("ShowReduc"), 'reduc').' '; if ($line->description == '(DEPOSIT)') $txt = $langs->trans("Deposit"); elseif ($line->description == '(EXCESS RECEIVED)') $txt = $langs->trans("ExcessReceived"); elseif ($line->description == '(EXCESS PAID)') $txt = $langs->trans("ExcessPaid"); //else $txt=$langs->trans("Discount"); print $txt; print '</a>'; if ($line->description) { if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0) { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0)); } elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0) { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0)); // Add date of deposit if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) print ' ('.dol_print_date($discount->datec).')'; } elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0)); } elseif ($line->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0)); } else { print ($txt ? ' - ' : '').dol_htmlentitiesbr($line->description); } } } else { $format = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE ? 'dayhour' : 'day'; if ($line->fk_product > 0) { print $form->textwithtooltip($text, $description, 3, '', '', $i, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); } else { $type = (!empty($line->product_type) ? $line->product_type : $line->fk_product_type); if ($type == 1) $text = img_object($langs->trans('Service'), 'service'); else $text = img_object($langs->trans('Product'), 'product'); if (!empty($line->label)) { $text .= ' <strong>'.$line->label.'</strong>'; print $form->textwithtooltip($text, dol_htmlentitiesbr($line->description), 3, '', '', $i, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); } else { if (!empty($line->fk_parent_line)) print img_picto('', 'rightarrow'); if (preg_match('/^\(DEPOSIT\)/', $line->description)) { $newdesc = preg_replace('/^\(DEPOSIT\)/', $langs->trans("Deposit"), $line->description); print $text.' '.dol_htmlentitiesbr($newdesc); } else { print $text.' '.dol_htmlentitiesbr($line->description); } } } // Show date range if ($line->element == 'facturedetrec') { if ($line->date_start_fill || $line->date_end_fill) print '<br><div class="clearboth nowraponall">'; if ($line->date_start_fill) print $langs->trans('AutoFillDateFromShort').': '.yn($line->date_start_fill); if ($line->date_start_fill && $line->date_end_fill) print ' - '; if ($line->date_end_fill) print $langs->trans('AutoFillDateToShort').': '.yn($line->date_end_fill); if ($line->date_start_fill || $line->date_end_fill) print '</div>'; } else { if ($line->date_start || $line->date_end) print '<br><div class="clearboth nowraponall">'.get_date_range($line->date_start, $line->date_end, $format).'</div>'; //print get_date_range($line->date_start, $line->date_end, $format); } // Add description in form if ($line->fk_product > 0 && !empty($conf->global->PRODUIT_DESC_IN_FORM)) { print (!empty($line->description) && $line->description != $line->product_label) ? '<br>'.dol_htmlentitiesbr($line->description) : ''; } } if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $productfourn = new ProductFournisseur($this->db); $productfourn->fetch_product_fournisseur_price($line->fk_fournprice); print '<div class="clearboth"></div>'; print '<span class="opacitymedium">'.$langs->trans('Supplier').' : </span>'.$productfourn->getSocNomUrl(1, 'supplier').' - <span class="opacitymedium">'.$langs->trans('Ref').' : </span>'; // Supplier ref if ($user->rights->produit->creer || $user->rights->service->creer) // change required right here { print $productfourn->getNomUrl(); } else { print $productfourn->ref_supplier; } } if (!empty($conf->accounting->enabled) && $line->fk_accounting_account > 0) { $accountingaccount = new AccountingAccount($this->db); $accountingaccount->fetch($line->fk_accounting_account); print '<div class="clearboth"></div><br><span class="opacitymedium">'.$langs->trans('AccountingAffectation').' : </span>'.$accountingaccount->getNomUrl(0, 1, 1); } print '</td>'; if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines { print '<td class="linecolrefsupplier">'; print ($line->ref_fourn ? $line->ref_fourn : $line->ref_supplier); print '</td>'; } // VAT Rate print '<td class="linecolvat nowrap right">'; $coldisplay++; $positiverates = ''; if (price2num($line->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($line->tva_tx); if (price2num($line->total_localtax1)) $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax1_tx); if (price2num($line->total_localtax2)) $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax2_tx); if (empty($positiverates)) $positiverates = '0'; print vatrate($positiverates.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), '%', $line->info_bits); //print vatrate($line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits); ?></td> <?php /*if($this->element == "commande" || $this->element == "facture" ) { ?> <td class="linecolpachat nowrap right"> <?php //afra $sql = "SELECT price FROM `llx_product_fournisseur_price` WHERE fk_product=".$line->fk_product." ORDER BY datec DESC LIMIT 0,1 "; $res = $this->db->query($sql); $fnd = $this->db->num_rows($res); if($fnd>0) { while($data = $this->db->fetch_array($res)) { print round($data['price'],2); } } else { print "0"; } ?> </td> <?php }*/ if($line->fk_product){ $sql = "SELECT price,cost_price FROM `llx_product` WHERE rowid=".$line->fk_product.""; $getup_check = $this->db->query($sql); $data_up = $this->db->fetch_object($getup_check); $prix_achat=round($data_up->cost_price,2); }else{ $prix_achat=0; } ?> <td class="linecolpachat nowrap right"><?php print $prix_achat; ?></td> <td class="linecoluht nowrap right"><?php $coldisplay++; ?><?php print price($line->subprice); ?></td> <?php // afra : price by unit if($object->element == "facture") { $child = $line->fk_product; $updated_price = ($line->total_ht / $line->qty); /*if((($line->total_ht / $line->qty))>=0){ $updated_price0 = ($line->total_ht / $line->qty); $updated_price=round($updated_price0,2); }else{ $updated_price=0; }*/ ?> <td class="linecoluht nowrap right"> <input style="width:50px" type="text" id="module_line_<?php print $line->id."_".$object->id; ?>" name="module_line_<?php print $line->id."_".$object->id; ?>" id="update_unit_price" placeholder="<?php print $updated_price; ?>" value="<?php print $updated_price; ?>"/> <input type="hidden" name="module_lineinput_<?php print $line->id."_".$object->id; ?>" value="module_line_<?php print $line->id."_".$object->id; ?>#<?php print $line->id."_".$object->id."_".$unit_qty."_".$data->qty."_1"."_".$line->qty."_".$line->remise_percent; ?>" id="module_lineinput_<?php print $line->id."_".$object->id; ?>"> </td> <?php } // END-afra ?> <?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?> <td class="linecoluht_currency nowrap right"><?php $coldisplay++; ?><?php print price($line->multicurrency_subprice); ?></td> <?php } if ($inputalsopricewithtax) { ?> <td class="linecoluttc nowrap right"><?php $coldisplay++; ?><?php print (isset($line->pu_ttc) ?price($line->pu_ttc) : price($line->subprice)); ?></td> <?php } ?> <td class="linecolqty nowrap right"><?php $coldisplay++; ?> <?php if ((($line->info_bits & 2) != 2) && $line->special_code != 3) { // I comment this because it shows info even when not required // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; print price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price } else print ' '; print '</td>'; //afra if ($object->element == "commande" || $object->element == "facture") { $sql = "SELECT colis_qty,palette_qty FROM `llx_product_extrafields` WHERE fk_object=".$line->fk_product." "; $res = $this->db->query($sql); $fnd = $this->db->num_rows($res); $colis_qty = "0"; $palette_qty = "0"; if($fnd>0) { while($data = $this->db->fetch_array($res)) { $colis_qty = ($line->qty/$data['colis_qty']); $palette_qty = ($line->qty/($data['colis_qty']*$data['palette_qty'])); } } else { $colis_qty = "0.0"; $palette_qty = "0.0"; } //qty colis print '<td class="linecolqtycolis nowrap right">'.round($colis_qty,2).'</td>'; //qty palette //print '<td class="linecolqtypalette nowrap right">'.round($palette_qty,2).'</td>'; } if ($conf->global->PRODUCT_USE_UNITS) { print '<td class="linecoluseunit nowrap left">'; $label = $line->getLabelOfUnit('short'); if ($label !== '') { print $langs->trans($label); } print '</td>'; } if (!empty($line->remise_percent) && $line->special_code != 3) { print '<td class="linecoldiscount right">'; $coldisplay++; include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; print dol_print_reduction($line->remise_percent, $langs); print '</td>'; } else { print '<td class="linecoldiscount"> </td>'; $coldisplay++; } // Fields for situation invoices if ($this->situation_cycle_ref) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; $coldisplay++; print '<td class="linecolcycleref nowrap right">'.$line->situation_percent.'%</td>'; $coldisplay++; $locataxes_array = getLocalTaxesFromRate($line->tva.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), 0, ($senderissupplier ? $mysoc : $object->thirdparty), ($senderissupplier ? $object->thirdparty : $mysoc)); $tmp = calcul_price_total($line->qty, $line->pu, $line->remise_percent, $line->txtva, -1, -1, 0, 'HT', $line->info_bits, $line->type, ($senderissupplier ? $object->thirdparty : $mysoc), $locataxes_array, 100, $object->multicurrency_tx, $line->multicurrency_subprice); print '<td align="right" class="linecolcycleref2 nowrap">'.price($tmp[0]).'</td>'; } //Amine cacher les marges de la liste /*if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) { if (!empty($user->rights->margins->creer)) { ?> <td class="linecolmargin1 nowrap margininfos right"><?php $coldisplay++; ?><?php print price($line->pa_ht); ?></td> <?php } if (!empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { ?> <td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php print (($line->pa_ht == 0) ? 'n/a' : price(price2num($line->marge_tx, 'MT')).'%'); ?></td> <?php } if (!empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?> <td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php print price(price2num($line->marque_tx, 'MT')).'%'; ?></td> <?php } }*/ ?> <?php // Amine :2 prix de revient if($object->element == "facture") { $child = $line->fk_product; //$updated_price2 = round($prix_achat,2); $sql2 = "SELECT buy_price_ht FROM `llx_facturedet` WHERE rowid=".$line->id.""; $getup_buy_price = $this->db->query($sql2); $data_up_price = $this->db->fetch_object($getup_buy_price); $buy_price_ht=$data_up_price->buy_price_ht; $updated_price2=round($buy_price_ht,2); ?> <td class="linecolmargin1 nowrap margininfos right"> <input style="width:50px" type="text" id="module_revient_<?php print $line->id."_".$object->id; ?>" name="module_revient_<?php print $line->id."_".$object->id; ?>" value="<?php print $updated_price2; ?>"/> <input type="hidden" name="module_linerevientinput_<?php print $line->id."_".$object->id; ?>" value="module_revient_<?php print $line->id."_".$object->id; ?>#<?php print $line->id."_".$object->id."_".$unit_qty."_".$data->qty."_1"."_".$line->qty."_".$line->remise_percent; ?>" id="module_linerevientinput_<?php print $line->id."_".$object->id; ?>"> </td> <?php } // END-afra ?> <?php if ($line->special_code == 3) { ?> <td class="linecoloption nowrap right"><?php $coldisplay++; ?><?php print $langs->trans('Option'); ?></td> <?php } else { print '<td class="linecolht nowrap right">'; $coldisplay++; if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $tooltiponprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht); $tooltiponprice .= '<br>'.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_tva); if (!$senderissupplier && is_object($object->thirdparty)) { if ($mysoc->useLocalTax(1)) { if (($mysoc->country_code == $object->thirdparty->country_code) || $object->thirdparty->useLocalTax(1)) { $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax1); } else { $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT1", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'=<span class="opacitymedium">'.$langs->trans("NotUsedForThisCustomer").'</span>'; } } if ($mysoc->useLocalTax(2)) { if (($mysoc->country_code == $object->thirdparty->country_code) || $object->thirdparty->useLocalTax(2)) { $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_localtax2); } else { $tooltiponprice .= '<br>'.$langs->transcountry("TotalLT2", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'=<span class="opacitymedium">'.$langs->trans("NotUsedForThisCustomer").'</span>'; } } } $tooltiponprice .= '<br>'.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->total_ttc); print '<span class="classfortooltip" title="'.dol_escape_htmltag($tooltiponprice).'">'; } print price($line->total_ht); if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { print '</span>'; } print '</td>'; if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { print '<td class="linecolutotalht_currency nowrap right">'.price($line->multicurrency_total_ht).'</td>'; $coldisplay++; } } if ($outputalsopricetotalwithtax) { print '<td class="linecolht nowrap right">'.price($line->total_ttc).'</td>'; $coldisplay++; } if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines') { print '<td class="linecoledit center">'; $coldisplay++; if (($line->info_bits & 2) == 2 || !empty($disableedit)) { } else { ?> <a class="editfielda reposition" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=editline&lineid='.$line->id.'#line_'.$line->id; ?>"> <?php print img_edit().'</a>'; } print '</td>'; print '<td class="linecoldelete center">'; $coldisplay++; if (($line->fk_prev_id == null) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=ask_deleteline&lineid='.$line->id.'">'; print img_delete(); print '</a>'; } print '</td>'; if ($num > 1 && $conf->browser->layout != 'phone' && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) { print '<td class="linecolmove tdlineupdown center">'; $coldisplay++; if ($i > 0) { ?> <a class="lineupdown" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>"> <?php print img_up('default', 0, 'imgupforline'); ?> </a> <?php } if ($i < $num - 1) { ?> <a class="lineupdown" href="<?php print $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=down&rowid='.$line->id; ?>"> <?php print img_down('default', 0, 'imgdownforline'); ?> </a> <?php } print '</td>'; } else { print '<td '.(($conf->browser->layout != 'phone' && empty($disablemove)) ? ' class="linecolmove tdlineupdown center"' : ' class="linecolmove center"').'></td>'; $coldisplay++; } } else { print '<td colspan="3"></td>'; $coldisplay = $coldisplay + 3; } if ($action == 'selectlines') { ?> <td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php print $i + 1; ?>]" value="<?php print $line->id; ?>" ></td> <?php } print "</tr>\n"; //Line extrafield if (!empty($extrafields)) { print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"', 'colspan'=>$coldisplay), '', '', 1); } print "<!-- END PHP TEMPLATE objectline_view.tpl.php -->\n";