mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v17
This commit is contained in:
parent
1f9424a4b3
commit
7c892802eb
|
|
@ -6299,7 +6299,7 @@ class Form
|
|||
}
|
||||
|
||||
if (!$options_only) {
|
||||
$return .= '<select class="flat minwidth75imp" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled ? ' disabled' : '').$title.'>';
|
||||
$return .= '<select class="flat minwidth50imp maxwidth100" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled ? ' disabled' : '').$title.'>';
|
||||
}
|
||||
|
||||
$selectedfound = false;
|
||||
|
|
@ -6346,6 +6346,7 @@ class Form
|
|||
|
||||
if (!$options_only) {
|
||||
$return .= '</select>';
|
||||
//$return .= ajax_combobox($htmlname); // This break for the moment dynamic autoselection of a value when selecting a product in object lines
|
||||
}
|
||||
} else {
|
||||
$return .= $this->error;
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ class modFckeditor extends DolibarrModules
|
|||
$this->const = array();
|
||||
$this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE", "yesno", "1", "WYSIWIG for the fields descriptions of elements (except products/services)");
|
||||
$this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC", "yesno", "1", "WYSIWIG for the fields description of products/services");
|
||||
$this->const[2] = array("FCKEDITOR_ENABLE_MAILING", "yesno", "1", "WYSIWIG for mass emailings");
|
||||
$this->const[3] = array("FCKEDITOR_ENABLE_DETAILS", "yesno", "1", "WYSIWIG for products details lines for all entities");
|
||||
$this->const[4] = array("FCKEDITOR_ENABLE_USERSIGN", "yesno", "1", "WYSIWIG for user signature");
|
||||
$this->const[2] = array("FCKEDITOR_ENABLE_DETAILS", "yesno", "1", "WYSIWIG for products details lines for all entities");
|
||||
$this->const[3] = array("FCKEDITOR_ENABLE_USERSIGN", "yesno", "1", "WYSIWIG for user signature");
|
||||
$this->const[4] = array("FCKEDITOR_ENABLE_MAILING", "yesno", "1", "WYSIWIG for mass emailings");
|
||||
$this->const[5] = array("FCKEDITOR_ENABLE_MAIL", "yesno", "1", "WYSIWIG for products details lines for all entities");
|
||||
$this->const[6] = array("FCKEDITOR_SKIN", "string", "moono-lisa", "Skin by default for fckeditor");
|
||||
|
||||
|
|
|
|||
|
|
@ -413,13 +413,14 @@ if ($nolinesbefore) {
|
|||
$coldisplay++;
|
||||
?>
|
||||
<td class="nobottom linecoluttc right">
|
||||
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat" value="<?php echo (GETPOSTISSET("price_ttc") ? GETPOST("price_ttc", 'alpha', 2) : ''); ?>">
|
||||
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat right" value="<?php echo (GETPOSTISSET("price_ttc") ? GETPOST("price_ttc", 'alpha', 2) : ''); ?>">
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
$coldisplay++;
|
||||
?>
|
||||
<td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="<?php echo (GETPOSTISSET("qty") ? GETPOST("qty", 'alpha', 2) : 1); ?>">
|
||||
<td class="nobottom linecolqty right">
|
||||
<input type="text" name="qty" id="qty" class="flat width40 right" value="<?php echo (GETPOSTISSET("qty") ? GETPOST("qty", 'alpha', 2) : 1); ?>">
|
||||
</td>
|
||||
<?php
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
|
|
@ -434,11 +435,12 @@ if ($nolinesbefore) {
|
|||
}
|
||||
$coldisplay++;
|
||||
?>
|
||||
<td class="nobottom nowrap linecoldiscount right"><input type="text" size="1" name="remise_percent" id="remise_percent" class="flat right" value="<?php echo (GETPOSTISSET("remise_percent") ? GETPOST("remise_percent", 'alpha', 2) : $remise_percent); ?>"><span class="hideonsmartphone">%</span></td>
|
||||
|
||||
<td class="nobottom nowrap linecoldiscount right"><input type="text" name="remise_percent" id="remise_percent" class="flat width40 right" value="<?php echo (GETPOSTISSET("remise_percent") ? GETPOST("remise_percent", 'alpha', 2) : ($remise_percent ? $remise_percent : '')); ?>"><span class="opacitymedium hideonsmartphone">%</span></td>
|
||||
<?php
|
||||
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom nowrap right"><input class="falt right" type="text" size="1" value="0" name="progress">%</td>';
|
||||
print '<td class="nobottom nowrap right"><input class="falt right" type="text" size="1" value="" name="progress"><span class="opacitymedium hideonsmartphone">%</span></td>';
|
||||
$coldisplay++;
|
||||
print '<td></td>';
|
||||
}
|
||||
|
|
@ -456,11 +458,11 @@ if ($nolinesbefore) {
|
|||
</td>
|
||||
<?php
|
||||
if (!empty($conf->global->DISPLAY_MARGIN_RATES)) {
|
||||
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right" type="text" size="2" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate hideonsmartphone">%</span></td>';
|
||||
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate opacitymedium hideonsmartphone">%</span></td>';
|
||||
$coldisplay++;
|
||||
}
|
||||
if (!empty($conf->global->DISPLAY_MARK_RATES)) {
|
||||
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right" type="text" size="2" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate hideonsmartphone">%</span></td>';
|
||||
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate opacitymedium hideonsmartphone">%</span></td>';
|
||||
$coldisplay++;
|
||||
}
|
||||
}
|
||||
|
|
@ -498,7 +500,6 @@ if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelecto
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (!empty($object->element) && $object->element == 'contrat') {
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
print $form->selectDate($date_start, "date_start", $usehm, $usehm, 1, "addproduct");
|
||||
|
|
@ -521,8 +522,8 @@ if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelecto
|
|||
?>
|
||||
function prefill_service_dates()
|
||||
{
|
||||
$('#date_start').val("<?php echo dol_escape_js(dol_print_date($date_start_prefill, '%d/%m/%Y')); ?>").trigger('change');
|
||||
$('#date_end').val("<?php echo dol_escape_js(dol_print_date($date_end_prefill, '%d/%m/%Y')); ?>").trigger('change');
|
||||
$('#date_start').val("<?php echo dol_escape_js(dol_print_date($date_start_prefill, 'day')); ?>").trigger('change');
|
||||
$('#date_end').val("<?php echo dol_escape_js(dol_print_date($date_end_prefill, 'day')); ?>").trigger('change');
|
||||
|
||||
return false; // Prevent default link behaviour (which is go to href URL)
|
||||
}
|
||||
|
|
@ -735,7 +736,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
|
|||
// Get the HT price for the product and display it
|
||||
console.log("Load unit price without tax and set it into #price_ht for product id="+$(this).val()+" socid=<?php print $object->socid; ?>");
|
||||
$.post('<?php echo DOL_URL_ROOT; ?>/product/ajax/products.php?action=fetch',
|
||||
{ 'id': $(this).val(), 'socid': <?php print $object->socid; ?> },
|
||||
{ 'id': $(this).val(), 'socid': <?php print $object->socid; ?>, 'token': '<?php print currentToken(); ?>' },
|
||||
function(data) {
|
||||
console.log("objectline_create.tpl Load unit price end, we got value ht="+data.price_ht+" ttc="+data.price_ttc+" pricebasetype="+data.pricebasetype);
|
||||
|
||||
|
|
@ -875,7 +876,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
|
|||
}
|
||||
options += '<option value="'+this.id+'" price="'+this.price+'">'+this.label+'</option>';
|
||||
});
|
||||
options += '<option value="inputprice" price="'+defaultprice+'"><?php echo $langs->trans("InputPrice"); ?></option>';
|
||||
options += '<option value="inputprice" price="'+defaultprice+'"><?php echo $langs->trans("InputPrice").'...'; ?></option>';
|
||||
|
||||
console.log("finally selected defaultkey="+defaultkey+" defaultprice for buying price="+defaultprice);
|
||||
|
||||
|
|
|
|||
|
|
@ -200,9 +200,12 @@ $coldisplay++;
|
|||
<?php
|
||||
}
|
||||
|
||||
// VAT Rate
|
||||
$coldisplay++;
|
||||
if (!$situationinvoicelinewithparent) {
|
||||
print '<td class="right">'.$form->load_tva('tva_tx', GETPOSTISSET('tva_tx') ? GETPOST('tva_tx', 'alpha') : ($line->tva_tx.($line->vat_src_code ? (' ('.$line->vat_src_code.')') : '')), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1).'</td>';
|
||||
print '<td class="right">';
|
||||
print $form->load_tva('tva_tx', GETPOSTISSET('tva_tx') ? GETPOST('tva_tx', 'alpha') : ($line->tva_tx.($line->vat_src_code ? (' ('.$line->vat_src_code.')') : '')), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1);
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td class="right"><input size="1" type="text" class="flat right" name="tva_tx" value="'.price($line->tva_tx).'" readonly />%</td>';
|
||||
}
|
||||
|
|
@ -266,24 +269,29 @@ $coldisplay++;
|
|||
?>
|
||||
|
||||
<td class="nowraponall right linecoldiscount">
|
||||
<?php $coldisplay++;
|
||||
<?php
|
||||
// Discount
|
||||
$coldisplay++;
|
||||
if (($line->info_bits & 2) != 2) {
|
||||
print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="'.(GETPOSTISSET('remise_percent') ? GETPOST('remise_percent') : $line->remise_percent).'"';
|
||||
print '<input type="text" class="flat right width40" name="remise_percent" id="remise_percent" value="'.(GETPOSTISSET('remise_percent') ? GETPOST('remise_percent') : ($line->remise_percent ? $line->remise_percent : '')).'"';
|
||||
if ($situationinvoicelinewithparent) {
|
||||
print ' readonly';
|
||||
}
|
||||
print '>%';
|
||||
print '><span class="hideonsmartphone opacitymedium">%</span>';
|
||||
} else { ?>
|
||||
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
// Progession for situation invoices
|
||||
if ($this->situation_cycle_ref) {
|
||||
$coldisplay++;
|
||||
print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="'.(GETPOSTISSET('progress') ? GETPOST('progress') : $line->situation_percent).'" name="progress">%</td>';
|
||||
$coldisplay++;
|
||||
print '<td></td>';
|
||||
}
|
||||
|
||||
if (!empty($usemargins)) {
|
||||
if (!empty($user->rights->margins->creer)) {
|
||||
$coldisplay++;
|
||||
|
|
@ -303,9 +311,9 @@ $coldisplay++;
|
|||
$margin_rate = (GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", "alpha", 2) : (($line->pa_ht == 0) ? '' : price($line->marge_tx)));
|
||||
// if credit note, dont allow to modify margin
|
||||
if ($line->subprice < 0) {
|
||||
echo '<td class="right nowrap margininfos">'.$margin_rate.'<span class="hideonsmartphone">%</span></td>';
|
||||
echo '<td class="right nowrap margininfos">'.$margin_rate.'<span class="opacitymedium hideonsmartphone">%</span></td>';
|
||||
} else {
|
||||
echo '<td class="right nowrap margininfos"><input class="right maxwidth75" type="text" name="np_marginRate" value="'.$margin_rate.'"><span class="hideonsmartphone">%</span></td>';
|
||||
echo '<td class="right nowrap margininfos"><input class="right maxwidth40" type="text" name="np_marginRate" value="'.$margin_rate.'"><span class="opacitymedium hideonsmartphone">%</span></td>';
|
||||
}
|
||||
$coldisplay++;
|
||||
}
|
||||
|
|
@ -313,9 +321,9 @@ $coldisplay++;
|
|||
$mark_rate = (GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : price($line->marque_tx));
|
||||
// if credit note, dont allow to modify margin
|
||||
if ($line->subprice < 0) {
|
||||
echo '<td class="right nowrap margininfos">'.$mark_rate.'<span class="hideonsmartphone">%</span></td>';
|
||||
echo '<td class="right nowrap margininfos">'.$mark_rate.'<span class="opacitymedium hideonsmartphone">%</span></td>';
|
||||
} else {
|
||||
echo '<td class="right nowrap margininfos"><input class="right maxwidth75" type="text" name="np_markRate" value="'.$mark_rate.'"><span class="hideonsmartphone">%</span></td>';
|
||||
echo '<td class="right nowrap margininfos"><input class="right maxwidth40" type="text" name="np_markRate" value="'.$mark_rate.'"><span class="opacitymedium hideonsmartphone">%</span></td>';
|
||||
}
|
||||
$coldisplay++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1583,6 +1583,7 @@ table[summary="list_of_modules"] .fa-cog {
|
|||
.widthauto { width: auto; }
|
||||
.width20 { width: 20px; }
|
||||
.width25 { width: 25px; }
|
||||
.width40 { width: 40px; }
|
||||
.width50 { width: 50px; }
|
||||
.width75 { width: 75px; }
|
||||
.width100 { width: 100px; }
|
||||
|
|
|
|||
|
|
@ -1677,6 +1677,7 @@ tr.nobottom td {
|
|||
.widthauto { width: auto; }
|
||||
.width20 { width: 20px; }
|
||||
.width25 { width: 25px; }
|
||||
.width40 { width: 40px; }
|
||||
.width50 { width: 50px; }
|
||||
.width75 { width: 75px; }
|
||||
.width100 { width: 100px; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user