Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/compta/facture/card.php htdocs/core/tpl/objectline_edit.tpl.php
This commit is contained in:
commit
408609e0ec
@ -100,7 +100,7 @@ $coldisplay=-1; // We remove first td
|
||||
}
|
||||
|
||||
// Do not allow editing during a situation cycle
|
||||
if (empty($this->situation_cycle_ref) || $this->situation_counter == 1)
|
||||
if ($line->fk_prev_id == null )
|
||||
{
|
||||
// editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
@ -138,15 +138,15 @@ $coldisplay=-1; // We remove first td
|
||||
}
|
||||
|
||||
$coldisplay++;
|
||||
if ($this->situation_counter == 1 || !$this->situation_cycle_ref) {
|
||||
print '<td class="right">' . $form->load_tva('tva_tx', $line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1) . '</td>';
|
||||
if ($line->fk_prev_id == null) {
|
||||
print '<td align="right">' . $form->load_tva('tva_tx', $line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1) . '</td>';
|
||||
} else {
|
||||
print '<td class="right"><input size="1" type="text" class="flat right" name="tva_tx" value="' . price($line->tva_tx) . '" readonly />%</td>';
|
||||
}
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="right"><input type="text" class="flat right" size="5" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"';
|
||||
if ($this->situation_counter > 1) print ' readonly';
|
||||
print '<td align="right"><input type="text" class="flat right" size="5" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"';
|
||||
if ($line->fk_prev_id != null) print ' readonly';
|
||||
print '></td>';
|
||||
|
||||
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
|
||||
@ -156,8 +156,8 @@ $coldisplay=-1; // We remove first td
|
||||
if ($inputalsopricewithtax)
|
||||
{
|
||||
$coldisplay++;
|
||||
print '<td class="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc,0,'',0):'').'"';
|
||||
if ($this->situation_counter > 1) print ' readonly';
|
||||
print '<td align="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc,0,'',0):'').'"';
|
||||
if ($line->fk_prev_id != null) print ' readonly';
|
||||
print '></td>';
|
||||
}
|
||||
?>
|
||||
@ -168,7 +168,7 @@ $coldisplay=-1; // We remove first td
|
||||
// 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 '<input size="3" type="text" class="flat right" name="qty" id="qty" value="' . $line->qty . '"';
|
||||
if ($this->situation_counter > 1) print ' readonly';
|
||||
if ($line->fk_prev_id != null ) print ' readonly';
|
||||
print '>';
|
||||
} else { ?>
|
||||
|
||||
@ -187,7 +187,7 @@ $coldisplay=-1; // We remove first td
|
||||
<td class="nowrap right"><?php $coldisplay++; ?>
|
||||
<?php if (($line->info_bits & 2) != 2) {
|
||||
print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"';
|
||||
if ($this->situation_counter > 1) print ' readonly';
|
||||
if ($line->fk_prev_id != null ) print ' readonly';
|
||||
print '>%';
|
||||
} else { ?>
|
||||
|
||||
|
||||
@ -283,7 +283,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
||||
|
||||
<td class="linecoldelete center"><?php $coldisplay++; ?>
|
||||
<?php
|
||||
if (($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disableremove)) {
|
||||
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 href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&action=ask_deleteline&lineid=' . $line->id . '">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
|
||||
@ -184,7 +184,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
dol_syslog( "Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id );
|
||||
|
||||
// First classify billed the order to allow the proposal classify process
|
||||
if (! empty($conf->fournisseur->commande->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER))
|
||||
if (! empty($conf->fournisseur->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER))
|
||||
{
|
||||
$object->fetchObjectLinked('','order_supplier',$object->id,$object->element);
|
||||
if (! empty($object->linkedObjects))
|
||||
|
||||
@ -680,11 +680,12 @@ class ProductFournisseur extends Product
|
||||
$sql.= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
|
||||
$sql.= " WHERE s.entity IN (".getEntity('societe').")";
|
||||
$sql.= " AND pfp.entity = ".$conf->entity; // only current entity
|
||||
$sql.= " AND pfp.fk_product = ".$prodid;
|
||||
$sql.= " AND pfp.fk_soc = s.rowid";
|
||||
$sql.= " AND s.status = 1"; // only enabled society
|
||||
if ($qty > 0) $sql.= " AND pfp.quantity <= ".$qty;
|
||||
if ($socid > 0) $sql.= ' AND pfp.fk_soc = '.$socid;
|
||||
if ($socid > 0) $sql.= ' AND pfp.fk_soc = '.$socid;
|
||||
|
||||
dol_syslog(get_class($this)."::find_min_price_product_fournisseur", LOG_DEBUG);
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ elseif ($type == '1')
|
||||
else
|
||||
{
|
||||
print $statProducts.$statServices;
|
||||
$total=round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2])+round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2]);
|
||||
$total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2])+round($prodser[0][3])+round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2])+round($prodser[1][3]); //Calcul du Total des Produits et Services
|
||||
}
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">';
|
||||
print $total;
|
||||
|
||||
@ -1243,7 +1243,7 @@ class Societe extends CommonObject
|
||||
$sql .= ', s.fk_forme_juridique as forme_juridique_code';
|
||||
$sql .= ', s.webservices_url, s.webservices_key';
|
||||
$sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode';
|
||||
$sql .= ', s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.fk_account, s.tva_assuj';
|
||||
$sql .= ', s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.fk_account, s.tva_assuj';
|
||||
$sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo';
|
||||
$sql .= ', s.fk_shipping_method';
|
||||
$sql .= ', s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms';
|
||||
@ -1256,6 +1256,7 @@ class Societe extends CommonObject
|
||||
$sql .= ', st.libelle as stcomm';
|
||||
$sql .= ', te.code as typent_code';
|
||||
$sql .= ', i.libelle as libelle_incoterms';
|
||||
$sql .= ', sr.remise_client';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as e ON s.fk_effectif = e.id';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid';
|
||||
@ -1264,6 +1265,7 @@ class Societe extends CommonObject
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as te ON s.fk_typent = te.id';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON s.fk_incoterms = i.rowid';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise as sr ON sr.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise WHERE fk_soc = s.rowid AND entity = '.$conf->entity.')';
|
||||
|
||||
$sql .= ' WHERE s.entity IN ('.getEntity($this->element).')';
|
||||
if ($rowid) $sql .= ' AND s.rowid = '.$rowid;
|
||||
@ -1377,7 +1379,7 @@ class Societe extends CommonObject
|
||||
|
||||
$this->prefix_comm = $obj->prefix_comm;
|
||||
|
||||
$this->remise_percent = $obj->remise_client;
|
||||
$this->remise_percent = price2num($obj->remise_client); // 0.000000 must be 0
|
||||
$this->remise_supplier_percent = $obj->remise_supplier;
|
||||
$this->mode_reglement_id = $obj->mode_reglement;
|
||||
$this->cond_reglement_id = $obj->cond_reglement;
|
||||
@ -3877,6 +3879,7 @@ class Societe extends CommonObject
|
||||
$sql .= " AND entity IN (".getEntity('invoice').")";
|
||||
$sql .= " AND paye = 0";
|
||||
$sql .= " AND fk_statut <> 0"; // Not a draft
|
||||
$sql .= " AND entity IN (".getEntity('invoice').")";
|
||||
//$sql .= " AND (fk_statut <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason
|
||||
$sql .= " AND fk_statut <> 3"; // Not abandonned
|
||||
$sql .= " AND fk_statut <> 2"; // Not clasified as paid
|
||||
|
||||
@ -1562,7 +1562,7 @@ div#tmenu_tooltip {
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
div.tmenusep {
|
||||
div.topmenuimage {
|
||||
<?php if ($disableimages) { ?>
|
||||
display: none;
|
||||
<?php } ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user