Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
ee5156034d
@ -1497,7 +1497,9 @@ class Propal extends CommonObject
|
||||
$this->note = $obj->note_private; // TODO deprecated
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->statut = (int) $obj->fk_statut;
|
||||
|
||||
$this->status = (int) $obj->fk_statut;
|
||||
$this->statut = $this->status; // deprecated
|
||||
$this->statut_libelle = $obj->statut_label;
|
||||
|
||||
$this->datec = $this->db->jdate($obj->datec); // TODO deprecated
|
||||
|
||||
@ -4104,7 +4104,7 @@ class Form
|
||||
} elseif ($input['type'] == 'select')
|
||||
{
|
||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">';
|
||||
if (!empty($input['label'])) $more .= $input['label'].'</div><div class="tagtd tdtop left">';
|
||||
if (!empty($input['label'])) $more .= $input['label'].'</div><div class="tagtd left">';
|
||||
$more .= $this->selectarray($input['name'], $input['values'], $input['default'], 1, 0, 0, $moreattr, 0, 0, 0, '', $morecss);
|
||||
$more .= '</div></div>'."\n";
|
||||
} elseif ($input['type'] == 'checkbox')
|
||||
|
||||
@ -171,7 +171,7 @@ if ($nolinesbefore) {
|
||||
echo '<label for="prod_entry_mode_free">';
|
||||
echo '<input type="radio" class="prod_entry_mode_free" name="prod_entry_mode" id="prod_entry_mode_free" value="free"';
|
||||
//echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : ((empty($forceall) && (empty($conf->product->enabled) || empty($conf->service->enabled)))?' checked':'') );
|
||||
echo (GETPOST('prod_entry_mode') == 'free' ? ' checked' : '');
|
||||
echo ((GETPOST('prod_entry_mode', 'alpha') == 'free' || ! empty($conf->global->MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT)) ? ' checked' : '');
|
||||
echo '> ';
|
||||
// Show type selector
|
||||
echo $langs->trans("FreeLineOfType");
|
||||
@ -187,7 +187,7 @@ if ($nolinesbefore) {
|
||||
echo ' ';
|
||||
}
|
||||
}
|
||||
echo $form->select_type_of_lines(isset($_POST["type"]) ?GETPOST("type", 'alpha', 2) : -1, 'type', 1, 1, $forceall);
|
||||
echo $form->select_type_of_lines(GETPOSTISSET("type") ? GETPOST("type", 'alpha', 2) : -1, 'type', 1, 1, $forceall);
|
||||
echo '</span>';
|
||||
}
|
||||
// Predefined product/service
|
||||
|
||||
@ -84,3 +84,4 @@ DefaultModelPropalClosed=Default template when closing a business proposal (unbi
|
||||
ProposalCustomerSignature=Written acceptance, company stamp, date and signature
|
||||
ProposalsStatisticsSuppliers=Vendor proposals statistics
|
||||
CaseFollowedBy=Case followed by
|
||||
SignedOnly=Signed only
|
||||
|
||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php';
|
||||
if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
@ -634,10 +634,10 @@ foreach ($listofreferent as $key => $value)
|
||||
if ($qualified && isset($margin)) // If this element must be included into profit calculation ($margin is 'minus' or 'add')
|
||||
{
|
||||
if ($margin == 'add') {
|
||||
$tooltiponprofitplus.=' + '.$name."<br>\n";
|
||||
$tooltiponprofitplus.=' > '.$name." (+)<br>\n";
|
||||
}
|
||||
if ($margin == 'minus') {
|
||||
$tooltiponprofitminus.=' - '.$name."<br>\n";
|
||||
$tooltiponprofitminus.=' > '.$name." (-)<br>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -692,7 +692,7 @@ foreach ($listofreferent as $key => $value)
|
||||
}
|
||||
if ($key == 'propal')
|
||||
{
|
||||
if ($element->statut == Propal::STATUS_NOTSIGNED) $qualifiedfortotal = false; // Refused proposal must not be included in total
|
||||
if ($element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) $qualifiedfortotal = false; // Only signed proposal must not be included in total
|
||||
}
|
||||
|
||||
if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty();
|
||||
@ -769,7 +769,8 @@ foreach ($listofreferent as $key => $value)
|
||||
// Each element with at least one line is output
|
||||
$qualifiedforfinalprofit = true;
|
||||
if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) $qualifiedforfinalprofit = false;
|
||||
//var_dump($key);
|
||||
if ($key == 'propal' && $element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) $qualifiedforfinalprofit = false;
|
||||
//var_dump($key.' '.$qualifiedforfinalprofit);
|
||||
|
||||
// Calculate margin
|
||||
if ($qualifiedforfinalprofit)
|
||||
@ -795,13 +796,19 @@ foreach ($listofreferent as $key => $value)
|
||||
print '<td class="right">'.$i.'</td>';
|
||||
// Amount HT
|
||||
print '<td class="right">';
|
||||
if (!$qualifiedforfinalprofit) print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>';
|
||||
else print price($total_ht);
|
||||
if ($key == 'intervention' && !$qualifiedforfinalprofit) print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>';
|
||||
else {
|
||||
print price($total_ht);
|
||||
if ($key == 'propal') print '<span class="opacitymedium">'.$form->textwithpicto('', $langs->trans("SignedOnly")).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
// Amount TTC
|
||||
print '<td class="right">';
|
||||
if (!$qualifiedforfinalprofit) print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>';
|
||||
else print price($total_ttc);
|
||||
if ($key == 'intervention' && !$qualifiedforfinalprofit) print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>';
|
||||
else {
|
||||
print price($total_ttc);
|
||||
if ($key == 'propal') print '<span class="opacitymedium">'.$form->textwithpicto('', $langs->trans("SignedOnly")).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user