FIX Balance of td
This commit is contained in:
parent
9c45b781af
commit
61bf731d17
@ -3966,7 +3966,7 @@ abstract class CommonObject
|
|||||||
// Fields for situation invoice
|
// Fields for situation invoice
|
||||||
if ($this->situation_cycle_ref) {
|
if ($this->situation_cycle_ref) {
|
||||||
print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>';
|
print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>';
|
||||||
//print '<td class="linecolcycleref2 right">' . $langs->trans('TotalHT100') . '</td>';
|
print '<td class="linecolcycleref2 right">' . $langs->trans('TotalHT100Short') . '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
||||||
|
|||||||
@ -1954,6 +1954,7 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0)
|
|||||||
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
|
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
|
||||||
if ($object->lines[$i]->situation_percent > 0)
|
if ($object->lines[$i]->situation_percent > 0)
|
||||||
{
|
{
|
||||||
|
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
|
||||||
$prev_progress = 0;
|
$prev_progress = 0;
|
||||||
$progress = 1;
|
$progress = 1;
|
||||||
if (method_exists($object->lines[$i], 'get_prev_progress'))
|
if (method_exists($object->lines[$i], 'get_prev_progress'))
|
||||||
@ -1964,9 +1965,11 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0)
|
|||||||
$result.=price($sign * ($total_ht/($object->lines[$i]->situation_percent/100)) * $progress, 0, $outputlangs);
|
$result.=price($sign * ($total_ht/($object->lines[$i]->situation_percent/100)) * $progress, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
$result.=price($sign * $total_ht, 0, $outputlangs);
|
$result.=price($sign * $total_ht, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
* @param int $qty Quantity
|
* @param int $qty Quantity
|
||||||
* @param float $pu Unit price (HT or TTC selon price_base_type)
|
* @param float $pu Unit price (HT or TTC selon price_base_type)
|
||||||
* @param float $remise_percent_ligne Discount for line
|
* @param float $remise_percent_ligne Discount for line
|
||||||
* @param float $txtva 0=do not apply standard tax, Vat rate=apply
|
* @param float $txtva 0=do not apply VAT tax, VAT rate=apply (this is VAT rate only without text code, we don't need text code because we alreaydy have all tax info into $localtaxes_array)
|
||||||
* @param float $uselocaltax1_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
|
* @param float $uselocaltax1_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
|
||||||
* @param float $uselocaltax2_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
|
* @param float $uselocaltax2_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
|
||||||
* @param float $remise_percent_global 0
|
* @param float $remise_percent_global 0
|
||||||
@ -131,13 +131,14 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
|
|||||||
$localtax2_type = $localtaxes_array[2];
|
$localtax2_type = $localtaxes_array[2];
|
||||||
$localtax2_rate = $localtaxes_array[3];
|
$localtax2_rate = $localtaxes_array[3];
|
||||||
}
|
}
|
||||||
else // deprecated method. values and type for localtaxes must be provided by caller and loaded with getLocalTaxesFromRate
|
else // deprecated method. values and type for localtaxes must be provided by caller and loaded with getLocalTaxesFromRate using the full vat rate (including text code)
|
||||||
{
|
{
|
||||||
|
dol_syslog("Price.lib::calcul_price_total search vat information using old deprecated method", LOG_WARNING);
|
||||||
|
|
||||||
$sql = "SELECT taux, localtax1, localtax2, localtax1_type, localtax2_type";
|
$sql = "SELECT taux, localtax1, localtax2, localtax1_type, localtax2_type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as cv";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as cv";
|
||||||
$sql.= " WHERE cv.taux = ".$txtva;
|
$sql.= " WHERE cv.taux = ".$txtva;
|
||||||
$sql.= " AND cv.fk_pays = ".$countryid;
|
$sql.= " AND cv.fk_pays = ".$countryid;
|
||||||
dol_syslog("Price.lib::calcul_price_total search vat information using old deprecated method", LOG_WARNING);
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@ -410,3 +411,4 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -134,7 +134,7 @@ if ($nolinesbefore) {
|
|||||||
// Fields for situation invoice
|
// Fields for situation invoice
|
||||||
if ($this->situation_cycle_ref) {
|
if ($this->situation_cycle_ref) {
|
||||||
print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>';
|
print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>';
|
||||||
//print '<td class="linecolcycleref2 right"></td>';
|
print '<td class="linecolcycleref2 right"></td>';
|
||||||
}
|
}
|
||||||
if (! empty($usemargins))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
@ -163,18 +163,18 @@ if ($nolinesbefore) {
|
|||||||
?>
|
?>
|
||||||
<tr class="pair nodrag nodrop nohoverpair<?php echo ($nolinesbefore || $object->element=='contrat')?'':' liste_titre_create'; ?>">
|
<tr class="pair nodrag nodrop nohoverpair<?php echo ($nolinesbefore || $object->element=='contrat')?'':' liste_titre_create'; ?>">
|
||||||
<?php
|
<?php
|
||||||
|
$coldisplay=0;
|
||||||
|
|
||||||
// Adds a line numbering column
|
// Adds a line numbering column
|
||||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||||
$coldisplay=2;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecolnum center"></td>
|
<td class="nobottom linecolnum center"></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$coldisplay=0;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
$coldisplay++;
|
||||||
|
?>
|
||||||
<td class="nobottom linecoldescription minwidth500imp">
|
<td class="nobottom linecoldescription minwidth500imp">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -334,7 +334,7 @@ else {
|
|||||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||||
$toolbarname='dolibarr_details';
|
$toolbarname='dolibarr_details';
|
||||||
if (! empty($conf->global->FCKEDITOR_ENABLE_DETAILS_FULL)) $toolbarname='dolibarr_notes';
|
if (! empty($conf->global->FCKEDITOR_ENABLE_DETAILS_FULL)) $toolbarname='dolibarr_notes';
|
||||||
$doleditor=new DolEditor('dp_desc', GETPOST('dp_desc'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT)?100:$conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%');
|
$doleditor=new DolEditor('dp_desc', GETPOST('dp_desc', 'none'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT)?100:$conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
// Show autofill date for recurring invoices
|
// Show autofill date for recurring invoices
|
||||||
@ -355,52 +355,71 @@ else {
|
|||||||
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
$coldisplay++;
|
||||||
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat maxwidth75" value="<?php echo (isset($_POST["fourn_ref"])?GETPOST("fourn_ref", 'alpha', 2):''); ?>"></td>
|
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat maxwidth75" value="<?php echo (isset($_POST["fourn_ref"])?GETPOST("fourn_ref", 'alpha', 2):''); ?>"></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<td class="nobottom linecolvat right"><?php
|
<td class="nobottom linecolvat right"><?php
|
||||||
|
$coldisplay++;
|
||||||
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" id="tva_tx" value="0">'.vatrate(0, true);
|
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" id="tva_tx" value="0">'.vatrate(0, true);
|
||||||
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1);
|
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td class="nobottom linecoluht right">
|
|
||||||
|
<td class="nobottom linecoluht right"><?php $coldisplay++; ?>
|
||||||
<input type="text" size="5" name="price_ht" id="price_ht" class="flat right" value="<?php echo (isset($_POST["price_ht"])?GETPOST("price_ht", 'alpha', 2):''); ?>">
|
<input type="text" size="5" name="price_ht" id="price_ht" class="flat right" value="<?php echo (isset($_POST["price_ht"])?GETPOST("price_ht", 'alpha', 2):''); ?>">
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
|
||||||
|
$coldisplay++;
|
||||||
|
?>
|
||||||
<td class="nobottom linecoluht_currency right">
|
<td class="nobottom linecoluht_currency right">
|
||||||
<input type="text" size="5" name="multicurrency_price_ht" id="multicurrency_price_ht" class="flat right" value="<?php echo (isset($_POST["multicurrency_price_ht"])?GETPOST("multicurrency_price_ht", 'alpha', 2):''); ?>">
|
<input type="text" size="5" name="multicurrency_price_ht" id="multicurrency_price_ht" class="flat right" value="<?php echo (isset($_POST["multicurrency_price_ht"])?GETPOST("multicurrency_price_ht", 'alpha', 2):''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if (! empty($inputalsopricewithtax)) { ?>
|
<?php if (! empty($inputalsopricewithtax)) {
|
||||||
|
$coldisplay++;
|
||||||
|
?>
|
||||||
<td class="nobottom linecoluttc right">
|
<td class="nobottom linecoluttc right">
|
||||||
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat" value="<?php echo (isset($_POST["price_ttc"])?GETPOST("price_ttc", 'alpha', 2):''); ?>">
|
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat" value="<?php echo (isset($_POST["price_ttc"])?GETPOST("price_ttc", 'alpha', 2):''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
|
$coldisplay++;
|
||||||
|
?>
|
||||||
<td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="<?php echo (isset($_POST["qty"])?GETPOST("qty", 'alpha', 2):1); ?>">
|
<td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="<?php echo (isset($_POST["qty"])?GETPOST("qty", 'alpha', 2):1); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
if($conf->global->PRODUCT_USE_UNITS)
|
if($conf->global->PRODUCT_USE_UNITS)
|
||||||
{
|
{
|
||||||
|
$coldisplay++;
|
||||||
print '<td class="nobottom linecoluseunit left">';
|
print '<td class="nobottom linecoluseunit left">';
|
||||||
print $form->selectUnits($line->fk_unit, "units");
|
print $form->selectUnits($line->fk_unit, "units");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
$remise_percent = $buyer->remise_percent;
|
$remise_percent = $buyer->remise_percent;
|
||||||
if($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') {
|
if($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier')
|
||||||
|
{
|
||||||
$remise_percent = $seller->remise_supplier_percent;
|
$remise_percent = $seller->remise_supplier_percent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom nowrap linecoldiscount right"><input type="text" size="1" name="remise_percent" id="remise_percent" class="flat right" value="<?php echo (isset($_POST["remise_percent"])?GETPOST("remise_percent", 'alpha', 2):$remise_percent); ?>"><span class="hideonsmartphone">%</span></td>
|
<td class="nobottom nowrap linecoldiscount right"><input type="text" size="1" name="remise_percent" id="remise_percent" class="flat right" value="<?php echo (isset($_POST["remise_percent"])?GETPOST("remise_percent", 'alpha', 2):$remise_percent); ?>"><span class="hideonsmartphone">%</span></td>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($this->situation_cycle_ref) {
|
if ($this->situation_cycle_ref) {
|
||||||
$coldisplay++;
|
$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="0" name="progress">%</td>';
|
||||||
|
$coldisplay++;
|
||||||
|
print '<td></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($usemargins))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
if (!empty($user->rights->margins->creer)) {
|
if (!empty($user->rights->margins->creer)) {
|
||||||
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom margininfos linecolmargin right">
|
<td class="nobottom margininfos linecolmargin right">
|
||||||
<!-- For predef product -->
|
<!-- For predef product -->
|
||||||
@ -411,7 +430,6 @@ else {
|
|||||||
<input type="text" size="5" id="buying_price" name="buying_price" class="flat right" value="<?php echo (isset($_POST["buying_price"])?GETPOST("buying_price", 'alpha', 2):''); ?>">
|
<input type="text" size="5" id="buying_price" name="buying_price" class="flat right" value="<?php echo (isset($_POST["buying_price"])?GETPOST("buying_price", 'alpha', 2):''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
$coldisplay++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->margins->creer)
|
if ($user->rights->margins->creer)
|
||||||
@ -427,12 +445,9 @@ else {
|
|||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $coldisplay++;
|
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $coldisplay++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$coldisplay+=$colspan;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecoledit center valignmiddle" colspan="<?php echo $colspan; ?>">
|
<td class="nobottom linecoledit center valignmiddle" colspan="<?php echo $colspan; ?>">
|
||||||
<input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline" id="addline">
|
<input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline" id="addline">
|
||||||
@ -441,62 +456,18 @@ else {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (is_object($objectline)) {
|
if (is_object($objectline)) {
|
||||||
print $objectline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay+8), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
print $objectline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required
|
if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required
|
||||||
{
|
{
|
||||||
$colspan = 6;
|
|
||||||
|
|
||||||
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
|
||||||
{
|
|
||||||
$colspan++;
|
|
||||||
}
|
|
||||||
if ($this->situation_cycle_ref) {
|
|
||||||
$colspan++;
|
|
||||||
}
|
|
||||||
// We add 1 if col total ttc
|
|
||||||
if (!empty($inputalsopricewithtax)) {
|
|
||||||
$colspan++;
|
|
||||||
}
|
|
||||||
if ($conf->global->PRODUCT_USE_UNITS) {
|
|
||||||
$colspan++;
|
|
||||||
}
|
|
||||||
if (count($object->lines)) {
|
|
||||||
//There will be an edit and a delete button
|
|
||||||
$colspan += 2;
|
|
||||||
|
|
||||||
// With this, there is a column move button ONLY if lines > 1
|
|
||||||
if (in_array($object->element, array(
|
|
||||||
'propal',
|
|
||||||
'supplier_proposal',
|
|
||||||
'facture',
|
|
||||||
'facturerec',
|
|
||||||
'invoice',
|
|
||||||
'commande',
|
|
||||||
'order',
|
|
||||||
'order_supplier',
|
|
||||||
'invoice_supplier'
|
|
||||||
))) {
|
|
||||||
$colspan++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) $colspan+=2;
|
|
||||||
|
|
||||||
if (! empty($usemargins))
|
|
||||||
{
|
|
||||||
if (!empty($user->rights->margins->creer)) $colspan++; // For the buying price
|
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr id="trlinefordates" <?php echo $bcnd[$var]; ?>>
|
<tr id="trlinefordates" <?php echo $bcnd[$var]; ?>>
|
||||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print '<td></td>'; } ?>
|
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print '<td></td>'; } ?>
|
||||||
<td colspan="<?php echo $colspan; ?>">
|
<td colspan="<?php echo $coldisplay - (empty($conf->global->MAIN_VIEW_LINE_NUMBER)?0:1); ?>">
|
||||||
<?php
|
<?php
|
||||||
$date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
|
$date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
|
||||||
$date_end=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
$date_end=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
||||||
|
|||||||
@ -207,7 +207,9 @@ $coldisplay=0;
|
|||||||
<?php
|
<?php
|
||||||
if ($this->situation_cycle_ref) {
|
if ($this->situation_cycle_ref) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nowrap right"><input class="right" type="text" size="1" value="' . $line->situation_percent . '" name="progress">%</td>';
|
print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="' . $line->situation_percent . '" name="progress">%</td>';
|
||||||
|
$coldisplay++;
|
||||||
|
print '<td></td>';
|
||||||
}
|
}
|
||||||
if (! empty($usemargins))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
@ -270,7 +272,7 @@ if (!empty($extrafieldsline))
|
|||||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||||
<td class="linecolnum center"></td>
|
<td class="linecolnum center"></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td colspan="<?php echo $coldisplay-1 ?>"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
|
<td colspan="<?php echo $coldisplay-(empty($conf->global->MAIN_VIEW_LINE_NUMBER)?0:1) ?>"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
|
||||||
<?php
|
<?php
|
||||||
$hourmin=(isset($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:'');
|
$hourmin=(isset($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:'');
|
||||||
print $form->selectDate($line->date_start, 'date_start', $hourmin, $hourmin, $line->date_start?0:1, "updateline", 1, 0);
|
print $form->selectDate($line->date_start, 'date_start', $hourmin, $hourmin, $line->date_start?0:1, "updateline", 1, 0);
|
||||||
|
|||||||
@ -237,17 +237,22 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
<td class="linecoldiscount"><?php $coldisplay++; ?> </td>
|
<td class="linecoldiscount"><?php $coldisplay++; ?> </td>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
|
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||||
|
|
||||||
// Fields for situation invoices
|
// Fields for situation invoices
|
||||||
if ($this->situation_cycle_ref)
|
if ($this->situation_cycle_ref)
|
||||||
{
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="linecolcycleref nowrap right">' . $line->situation_percent . '%</td>';
|
print '<td class="linecolcycleref nowrap right">' . $line->situation_percent . '%</td>';
|
||||||
//print '<td align="right" class="linecolcycleref2 nowrap">' . $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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
||||||
{
|
{
|
||||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if (!empty($user->rights->margins->creer)) { ?>
|
<?php if (!empty($user->rights->margins->creer)) { ?>
|
||||||
|
|||||||
@ -371,6 +371,7 @@ Percentage=Percentage
|
|||||||
Total=Total
|
Total=Total
|
||||||
SubTotal=Subtotal
|
SubTotal=Subtotal
|
||||||
TotalHTShort=Total (excl.)
|
TotalHTShort=Total (excl.)
|
||||||
|
TotalHT100Short=Total 100%% (excl.)
|
||||||
TotalHTShortCurrency=Total (excl. in currency)
|
TotalHTShortCurrency=Total (excl. in currency)
|
||||||
TotalTTCShort=Total (inc. tax)
|
TotalTTCShort=Total (inc. tax)
|
||||||
TotalHT=Total (excl. tax)
|
TotalHT=Total (excl. tax)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user