Merge branch 'Dolibarr:develop' into develop
This commit is contained in:
commit
78df3f54c4
@ -943,8 +943,10 @@ if ($rowid > 0) {
|
||||
}
|
||||
if (!$datefrom) {
|
||||
$datefrom = $object->datevalid;
|
||||
if ($object->datefin > 0) {
|
||||
if ($object->datefin > 0 && dol_time_plus_duree($object->datefin, $defaultdelay, $defaultdelayunit) < dol_now()) {
|
||||
$datefrom = dol_time_plus_duree($object->datefin, 1, 'd');
|
||||
} else {
|
||||
$datefrom = dol_get_first_day(dol_print_date(time(), "%Y"));
|
||||
}
|
||||
}
|
||||
print $form->selectDate($datefrom, '', '', '', '', "subscription", 1, 1);
|
||||
|
||||
@ -207,6 +207,9 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
//if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&radio_dump=postgresql_options">'.$langs->trans("UnHidePassword").'</a>';
|
||||
//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '</fieldset>';
|
||||
}
|
||||
|
||||
|
||||
@ -3857,13 +3857,14 @@ if ($action == 'create') {
|
||||
$totalpaye = $object->getSommePaiement();
|
||||
$totalcreditnotes = $object->getSumCreditNotesUsed();
|
||||
$totaldeposits = $object->getSumDepositsUsed();
|
||||
// print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits."
|
||||
//print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits."
|
||||
// selleruserrevenuestamp=".$selleruserevenustamp;
|
||||
|
||||
// We can also use bcadd to avoid pb with floating points
|
||||
// For example print 239.2 - 229.3 - 9.9; does not return 0.
|
||||
// $resteapayer=bcadd($object->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
// $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
|
||||
$resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT');
|
||||
|
||||
// Multicurrency
|
||||
@ -5120,10 +5121,9 @@ if ($action == 'create') {
|
||||
// Remainder to pay
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print '<span class="opacitymedium">';
|
||||
if ($resteapayeraffiche >= 0) {
|
||||
print $langs->trans('RemainderToPay');
|
||||
} else {
|
||||
print $langs->trans('ExcessReceived');
|
||||
print $langs->trans('RemainderToPay');
|
||||
if ($resteapayeraffiche < 0) {
|
||||
print ' ('.$langs->trans('NegativeIfExcessReceived').')';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
@ -5133,10 +5133,9 @@ if ($action == 'create') {
|
||||
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print '<span class="opacitymedium">';
|
||||
if ($resteapayeraffiche >= 0) {
|
||||
print $langs->trans('RemainderToPayMulticurrency');
|
||||
} else {
|
||||
print $langs->trans('ExcessReceivedMulticurrency');
|
||||
print $langs->trans('RemainderToPayMulticurrency');
|
||||
if ($resteapayeraffiche < 0) {
|
||||
print ' ('.$langs->trans('NegativeIfExcessReceived').')';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
@ -5164,33 +5163,33 @@ if ($action == 'create') {
|
||||
print ' :</td><td align="right">'.price($retainedWarranty).'</td><td> </td></tr>';
|
||||
}
|
||||
} else { // Credit note
|
||||
$resteapayeraffiche = $resteapayer;
|
||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||
|
||||
// Total already paid back
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print $langs->trans('AlreadyPaidBack');
|
||||
print ' :</td><td class="right"><span class="amount">'.price($sign * $totalpaye).'</span></td><td> </td></tr>';
|
||||
print '<span class="opacitymedium">'.$langs->trans('AlreadyPaidBack').'</span>';
|
||||
print '</td><td class="right"><span class="amount">'.price($sign * $totalpaye).'</span></td><td> </td></tr>';
|
||||
|
||||
// Billed
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("Billed").' :</td><td class="right">'.price($sign * $object->total_ttc).'</td><td> </td></tr>';
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right"><span class="opacitymedium">'.$langs->trans("Billed").'</span></td><td class="right">'.price($sign * $object->total_ttc).'</td><td> </td></tr>';
|
||||
|
||||
// Remainder to pay back
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print $langs->trans('RemainderToPayBack');
|
||||
print '<span class="opacitymedium">'.$langs->trans('RemainderToPayBack');
|
||||
if ($resteapayeraffiche > 0) {
|
||||
print ' ('.$langs->trans('ExcessPaid').')';
|
||||
print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
|
||||
}
|
||||
print ' :</td>';
|
||||
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopayback' : (' '.$cssforamountpaymentcomplete)).'">'.price($sign * $resteapayeraffiche).'</td><td> </td></tr>';
|
||||
print '</span></td>';
|
||||
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopayback' : (' '.$cssforamountpaymentcomplete)).'">'.price($sign * $resteapayeraffiche).'</td>';
|
||||
print '<td class="nowrap"> </td></tr>';
|
||||
|
||||
// Remainder to pay back Multicurrency
|
||||
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">';
|
||||
print '<span class="opacitymedium">';
|
||||
if ($resteapayeraffiche <= 0) {
|
||||
print $langs->trans('RemainderToPayBackMulticurrency');
|
||||
} else {
|
||||
print $langs->trans('ExcessPaidMulticurrency');
|
||||
print '<span class="opacitymedium">'.$langs->trans('RemainderToPayBackMulticurrency');
|
||||
if ($resteapayeraffiche > 0) {
|
||||
print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
|
||||
@ -3299,8 +3299,8 @@ class Facture extends CommonInvoice
|
||||
$this->line->desc = $desc;
|
||||
$this->line->ref_ext = $ref_ext;
|
||||
|
||||
$this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ?abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative
|
||||
$this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||
$this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ? abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative
|
||||
$this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ? -abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||
|
||||
$this->line->vat_src_code = $vat_src_code;
|
||||
$this->line->tva_tx = $txtva;
|
||||
@ -3309,11 +3309,11 @@ class Facture extends CommonInvoice
|
||||
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||
|
||||
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ttc) : $total_ttc); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_localtax1 = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_localtax1) : $total_localtax1); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_localtax2 = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_localtax2) : $total_localtax2); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_ttc) : $total_ttc); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_tva) : $total_tva); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_localtax1 = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_localtax1) : $total_localtax1); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_localtax2 = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_localtax2) : $total_localtax2); // For credit note and if qty is negative, total is negative
|
||||
|
||||
$this->line->fk_product = $fk_product;
|
||||
$this->line->product_type = $product_type;
|
||||
@ -3340,10 +3340,11 @@ class Facture extends CommonInvoice
|
||||
// Multicurrency
|
||||
$this->line->fk_multicurrency = $this->fk_multicurrency;
|
||||
$this->line->multicurrency_code = $this->multicurrency_code;
|
||||
$this->line->multicurrency_subprice = $pu_ht_devise;
|
||||
$this->line->multicurrency_total_ht = $multicurrency_total_ht;
|
||||
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
|
||||
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;
|
||||
$this->line->multicurrency_subprice = ($this->type == self::TYPE_CREDIT_NOTE ? -abs($pu_ht_devise) : $pu_ht_devise); // For credit note, unit price always negative, always positive otherwise
|
||||
|
||||
$this->line->multicurrency_total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_ht) : $multicurrency_total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->multicurrency_total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_tva) : $multicurrency_total_tva); // For credit note and if qty is negative, total is negative
|
||||
$this->line->multicurrency_total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_ttc) : $multicurrency_total_ttc); // For credit note and if qty is negative, total is negative
|
||||
|
||||
if (is_array($array_options) && count($array_options) > 0) {
|
||||
$this->line->array_options = $array_options;
|
||||
|
||||
@ -810,8 +810,9 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
// Email
|
||||
if (!empty($arrayfields['s.email']['checked'])) {
|
||||
print '<td>'.dol_print_email($obj->email).'</td>';
|
||||
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->email).'">'.dol_print_email($obj->email, 0, $obj->socid, 0, 0, 1, 1).'</td>';
|
||||
}
|
||||
// Town
|
||||
if (!empty($arrayfields['s.town']['checked'])) {
|
||||
|
||||
@ -146,9 +146,6 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
||||
$filenamenb = $dir."/".$prefix."invoicesnbinyear-".$endyear.".png";
|
||||
// default value for customer mode
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') {
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessuppliernbinyear-'.$endyear.'.png';
|
||||
}
|
||||
|
||||
$px1 = new DolGraph();
|
||||
$mesg = $px1->isGraphKo();
|
||||
@ -189,10 +186,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
||||
|
||||
$filenamenb = $dir."/".$prefix."invoicesamountinyear-".$endyear.".png";
|
||||
// default value for customer mode
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') {
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessupplieramountinyear-'.$endyear.'.png';
|
||||
}
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$endyear.'.png';
|
||||
|
||||
$px2 = new DolGraph();
|
||||
$mesg = $px2->isGraphKo();
|
||||
@ -251,7 +245,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
||||
$stringtoshow .= '<input type="checkbox" name="'.$param_showtot.'"'.($showtot ? ' checked' : '').'> '.$langs->trans("AmountOfBillsByMonthHT");
|
||||
$stringtoshow .= '<br>';
|
||||
$stringtoshow .= $langs->trans("Year").' <input class="flat" size="4" type="text" name="'.$param_year.'" value="'.$endyear.'">';
|
||||
$stringtoshow .= '<input class="reposition inline-block valigntextbottom" type="image" alt="'.$langs->trans("Refresh").'" src="'.img_picto($langs->trans("Refresh"), 'refresh.png', '', '', 1).'">';
|
||||
$stringtoshow .= '<input type="image" class="reposition inline-block valigntextbottom" alt="'.$langs->trans("Refresh").'" src="'.img_picto($langs->trans("Refresh"), 'refresh.png', '', '', 1).'">';
|
||||
$stringtoshow .= '</form>';
|
||||
$stringtoshow .= '</div>';
|
||||
if ($shownb && $showtot) {
|
||||
|
||||
@ -125,9 +125,6 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
$showtot = 1;
|
||||
}
|
||||
$nowarray = dol_getdate(dol_now(), true);
|
||||
if (empty($year)) {
|
||||
$year = $nowarray['year'];
|
||||
}
|
||||
if (empty($endyear)) {
|
||||
$endyear = $nowarray['year'];
|
||||
}
|
||||
@ -143,12 +140,9 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
if ($shownb) {
|
||||
$data1 = $stats->getNbByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), ($WIDTH < 300 ? 2 : 0), $startmonth);
|
||||
|
||||
$filenamenb = $dir."/".$prefix."invoicessuppliernbinyear-".$year.".png";
|
||||
$filenamenb = $dir."/".$prefix."invoicessuppliernbinyear-".$endyear.".png";
|
||||
// default value for customer mode
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesnbinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') {
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessuppliernbinyear-'.$year.'.png';
|
||||
}
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessuppliernbinyear-'.$endyear.'.png';
|
||||
|
||||
$px1 = new DolGraph();
|
||||
$mesg = $px1->isGraphKo();
|
||||
@ -186,12 +180,9 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
if ($showtot) {
|
||||
$data2 = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), ($WIDTH < 300 ? 2 : 0), $startmonth);
|
||||
|
||||
$filenamenb = $dir."/".$prefix."invoicessupplieramountinyear-".$year.".png";
|
||||
$filenamenb = $dir."/".$prefix."invoicessupplieramountinyear-".$endyear.".png";
|
||||
// default value for customer mode
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstats&file=invoicesamountinyear-'.$year.'.png';
|
||||
if ($mode == 'supplier') {
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessupplieramountinyear-'.$year.'.png';
|
||||
}
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=billstatssupplier&file=invoicessupplieramountinyear-'.$endyear.'.png';
|
||||
|
||||
$px2 = new DolGraph();
|
||||
$mesg = $px2->isGraphKo();
|
||||
@ -273,17 +264,12 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
}
|
||||
$this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'class="nohover center"', 'textnoformat'=>$stringtoshow);
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'tr'=>'class="oddeven nohover"',
|
||||
'td' => 'class="nohover left"',
|
||||
'maxlength'=>500,
|
||||
'text' => $mesg,
|
||||
);
|
||||
$this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'class="nohover left"', 'maxlength'=>500, 'text' => $mesg);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'class="nohover opacitymedium left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed")
|
||||
'td' => 'class="nohover left"',
|
||||
'text' => '<span class="opacitymedium">'.$langs->trans("ReadPermissionNotAllowed").'</span>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -399,7 +399,7 @@ abstract class CommonDocGenerator
|
||||
|
||||
$sumpayed = $sumdeposit = $sumcreditnote = '';
|
||||
$already_payed_all = 0;
|
||||
$remain_to_pay = 0;
|
||||
|
||||
if ($object->element == 'facture') {
|
||||
$invoice_source = new Facture($this->db);
|
||||
if ($object->fk_facture_source > 0) {
|
||||
@ -409,7 +409,6 @@ abstract class CommonDocGenerator
|
||||
$sumdeposit = $object->getSumDepositsUsed();
|
||||
$sumcreditnote = $object->getSumCreditNotesUsed();
|
||||
$already_payed_all = $sumpayed + $sumdeposit + $sumcreditnote;
|
||||
$remain_to_pay = $sumpayed - $sumdeposit - $sumcreditnote;
|
||||
|
||||
if ($object->fk_account > 0) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
@ -421,76 +420,76 @@ abstract class CommonDocGenerator
|
||||
$date = ($object->element == 'contrat' ? $object->date_contrat : $object->date);
|
||||
|
||||
$resarray = array(
|
||||
$array_key.'_id'=>$object->id,
|
||||
$array_key.'_ref'=>$object->ref,
|
||||
$array_key.'_ref_ext'=>$object->ref_ext,
|
||||
$array_key.'_ref_customer'=>(!empty($object->ref_client) ? $object->ref_client : (empty($object->ref_customer) ? '' : $object->ref_customer)),
|
||||
$array_key.'_ref_supplier'=>(!empty($object->ref_fournisseur) ? $object->ref_fournisseur : (empty($object->ref_supplier) ? '' : $object->ref_supplier)),
|
||||
$array_key.'_source_invoice_ref'=>$invoice_source->ref,
|
||||
// Dates
|
||||
$array_key.'_hour'=>dol_print_date($date, 'hour'),
|
||||
$array_key.'_date'=>dol_print_date($date, 'day'),
|
||||
$array_key.'_date_rfc'=>dol_print_date($date, 'dayrfc'),
|
||||
$array_key.'_date_limit'=>(!empty($object->date_lim_reglement) ?dol_print_date($object->date_lim_reglement, 'day') : ''),
|
||||
$array_key.'_date_end'=>(!empty($object->fin_validite) ?dol_print_date($object->fin_validite, 'day') : ''),
|
||||
$array_key.'_date_creation'=>dol_print_date($object->date_creation, 'day'),
|
||||
$array_key.'_date_modification'=>(!empty($object->date_modification) ?dol_print_date($object->date_modification, 'day') : ''),
|
||||
$array_key.'_date_validation'=>(!empty($object->date_validation) ?dol_print_date($object->date_validation, 'dayhour') : ''),
|
||||
$array_key.'_date_delivery_planed'=>(!empty($object->date_livraison) ?dol_print_date($object->date_livraison, 'day') : ''),
|
||||
$array_key.'_date_close'=>(!empty($object->date_cloture) ?dol_print_date($object->date_cloture, 'dayhour') : ''),
|
||||
$array_key.'_id'=>$object->id,
|
||||
$array_key.'_ref'=>$object->ref,
|
||||
$array_key.'_ref_ext'=>$object->ref_ext,
|
||||
$array_key.'_ref_customer'=>(!empty($object->ref_client) ? $object->ref_client : (empty($object->ref_customer) ? '' : $object->ref_customer)),
|
||||
$array_key.'_ref_supplier'=>(!empty($object->ref_fournisseur) ? $object->ref_fournisseur : (empty($object->ref_supplier) ? '' : $object->ref_supplier)),
|
||||
$array_key.'_source_invoice_ref'=>$invoice_source->ref,
|
||||
// Dates
|
||||
$array_key.'_hour'=>dol_print_date($date, 'hour'),
|
||||
$array_key.'_date'=>dol_print_date($date, 'day'),
|
||||
$array_key.'_date_rfc'=>dol_print_date($date, 'dayrfc'),
|
||||
$array_key.'_date_limit'=>(!empty($object->date_lim_reglement) ?dol_print_date($object->date_lim_reglement, 'day') : ''),
|
||||
$array_key.'_date_end'=>(!empty($object->fin_validite) ?dol_print_date($object->fin_validite, 'day') : ''),
|
||||
$array_key.'_date_creation'=>dol_print_date($object->date_creation, 'day'),
|
||||
$array_key.'_date_modification'=>(!empty($object->date_modification) ?dol_print_date($object->date_modification, 'day') : ''),
|
||||
$array_key.'_date_validation'=>(!empty($object->date_validation) ?dol_print_date($object->date_validation, 'dayhour') : ''),
|
||||
$array_key.'_date_delivery_planed'=>(!empty($object->date_livraison) ?dol_print_date($object->date_livraison, 'day') : ''),
|
||||
$array_key.'_date_close'=>(!empty($object->date_cloture) ?dol_print_date($object->date_cloture, 'dayhour') : ''),
|
||||
|
||||
$array_key.'_payment_mode_code'=>$object->mode_reglement_code,
|
||||
$array_key.'_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code) : $object->mode_reglement),
|
||||
$array_key.'_payment_term_code'=>$object->cond_reglement_code,
|
||||
$array_key.'_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code ? $outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code) : ($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement)),
|
||||
$array_key.'_payment_mode_code'=>$object->mode_reglement_code,
|
||||
$array_key.'_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code) : $object->mode_reglement),
|
||||
$array_key.'_payment_term_code'=>$object->cond_reglement_code,
|
||||
$array_key.'_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code ? $outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code) : ($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement)),
|
||||
|
||||
$array_key.'_incoterms'=>(method_exists($object, 'display_incoterms') ? $object->display_incoterms() : ''),
|
||||
$array_key.'_incoterms'=>(method_exists($object, 'display_incoterms') ? $object->display_incoterms() : ''),
|
||||
|
||||
$array_key.'_bank_iban'=>$bank_account->iban,
|
||||
$array_key.'_bank_bic'=>$bank_account->bic,
|
||||
$array_key.'_bank_label'=>$bank_account->label,
|
||||
$array_key.'_bank_number'=>$bank_account->number,
|
||||
$array_key.'_bank_proprio'=>$bank_account->proprio,
|
||||
$array_key.'_bank_iban'=>$bank_account->iban,
|
||||
$array_key.'_bank_bic'=>$bank_account->bic,
|
||||
$array_key.'_bank_label'=>$bank_account->label,
|
||||
$array_key.'_bank_number'=>$bank_account->number,
|
||||
$array_key.'_bank_proprio'=>$bank_account->proprio,
|
||||
|
||||
$array_key.'_total_ht_locale'=>price($object->total_ht, 0, $outputlangs),
|
||||
$array_key.'_total_vat_locale'=>(!empty($object->total_vat) ?price($object->total_vat, 0, $outputlangs) : price($object->total_tva, 0, $outputlangs)),
|
||||
$array_key.'_total_localtax1_locale'=>price($object->total_localtax1, 0, $outputlangs),
|
||||
$array_key.'_total_localtax2_locale'=>price($object->total_localtax2, 0, $outputlangs),
|
||||
$array_key.'_total_ttc_locale'=>price($object->total_ttc, 0, $outputlangs),
|
||||
$array_key.'_total_ht_locale'=>price($object->total_ht, 0, $outputlangs),
|
||||
$array_key.'_total_vat_locale'=>(!empty($object->total_vat) ?price($object->total_vat, 0, $outputlangs) : price($object->total_tva, 0, $outputlangs)),
|
||||
$array_key.'_total_localtax1_locale'=>price($object->total_localtax1, 0, $outputlangs),
|
||||
$array_key.'_total_localtax2_locale'=>price($object->total_localtax2, 0, $outputlangs),
|
||||
$array_key.'_total_ttc_locale'=>price($object->total_ttc, 0, $outputlangs),
|
||||
|
||||
$array_key.'_total_ht'=>price2num($object->total_ht),
|
||||
$array_key.'_total_vat'=>(!empty($object->total_vat) ?price2num($object->total_vat) : price2num($object->total_tva)),
|
||||
$array_key.'_total_localtax1'=>price2num($object->total_localtax1),
|
||||
$array_key.'_total_localtax2'=>price2num($object->total_localtax2),
|
||||
$array_key.'_total_ttc'=>price2num($object->total_ttc),
|
||||
$array_key.'_total_ht'=>price2num($object->total_ht),
|
||||
$array_key.'_total_vat'=>(!empty($object->total_vat) ?price2num($object->total_vat) : price2num($object->total_tva)),
|
||||
$array_key.'_total_localtax1'=>price2num($object->total_localtax1),
|
||||
$array_key.'_total_localtax2'=>price2num($object->total_localtax2),
|
||||
$array_key.'_total_ttc'=>price2num($object->total_ttc),
|
||||
|
||||
$array_key.'_multicurrency_code' => $object->multicurrency_code,
|
||||
$array_key.'_multicurrency_tx' => price2num($object->multicurrency_tx),
|
||||
$array_key.'_multicurrency_total_ht' => price2num($object->multicurrency_total_ht),
|
||||
$array_key.'_multicurrency_total_tva' => price2num($object->multicurrency_total_tva),
|
||||
$array_key.'_multicurrency_total_ttc' => price2num($object->multicurrency_total_ttc),
|
||||
$array_key.'_multicurrency_total_ht_locale' => price($object->multicurrency_total_ht, 0, $outputlangs),
|
||||
$array_key.'_multicurrency_total_tva_locale' => price($object->multicurrency_total_tva, 0, $outputlangs),
|
||||
$array_key.'_multicurrency_total_ttc_locale' => price($object->multicurrency_total_ttc, 0, $outputlangs),
|
||||
$array_key.'_multicurrency_code' => $object->multicurrency_code,
|
||||
$array_key.'_multicurrency_tx' => price2num($object->multicurrency_tx),
|
||||
$array_key.'_multicurrency_total_ht' => price2num($object->multicurrency_total_ht),
|
||||
$array_key.'_multicurrency_total_tva' => price2num($object->multicurrency_total_tva),
|
||||
$array_key.'_multicurrency_total_ttc' => price2num($object->multicurrency_total_ttc),
|
||||
$array_key.'_multicurrency_total_ht_locale' => price($object->multicurrency_total_ht, 0, $outputlangs),
|
||||
$array_key.'_multicurrency_total_tva_locale' => price($object->multicurrency_total_tva, 0, $outputlangs),
|
||||
$array_key.'_multicurrency_total_ttc_locale' => price($object->multicurrency_total_ttc, 0, $outputlangs),
|
||||
|
||||
$array_key.'_note_private'=>$object->note,
|
||||
$array_key.'_note_public'=>$object->note_public,
|
||||
$array_key.'_note'=>$object->note_public, // For backward compatibility
|
||||
$array_key.'_note_private'=>$object->note,
|
||||
$array_key.'_note_public'=>$object->note_public,
|
||||
$array_key.'_note'=>$object->note_public, // For backward compatibility
|
||||
|
||||
// Payments
|
||||
$array_key.'_already_payed_locale'=>price($sumpayed, 0, $outputlangs),
|
||||
$array_key.'_already_payed'=>price2num($sumpayed),
|
||||
$array_key.'_already_deposit_locale'=>price($sumdeposit, 0, $outputlangs),
|
||||
$array_key.'_already_deposit'=>price2num($sumdeposit),
|
||||
$array_key.'_already_creditnote_locale'=>price($sumcreditnote, 0, $outputlangs),
|
||||
$array_key.'_already_creditnote'=>price2num($sumcreditnote),
|
||||
// Payments
|
||||
$array_key.'_already_payed_locale'=>price($sumpayed, 0, $outputlangs),
|
||||
$array_key.'_already_payed'=>price2num($sumpayed),
|
||||
$array_key.'_already_deposit_locale'=>price($sumdeposit, 0, $outputlangs),
|
||||
$array_key.'_already_deposit'=>price2num($sumdeposit),
|
||||
$array_key.'_already_creditnote_locale'=>price($sumcreditnote, 0, $outputlangs),
|
||||
$array_key.'_already_creditnote'=>price2num($sumcreditnote),
|
||||
|
||||
$array_key.'_already_payed_all_locale'=>price(price2num($already_payed_all, 'MT'), 0, $outputlangs),
|
||||
$array_key.'_already_payed_all'=> price2num($already_payed_all, 'MT'),
|
||||
$array_key.'_already_payed_all_locale'=>price(price2num($already_payed_all, 'MT'), 0, $outputlangs),
|
||||
$array_key.'_already_payed_all'=> price2num($already_payed_all, 'MT'),
|
||||
|
||||
// Remain to pay with all know information (except open direct debit requests)
|
||||
$array_key.'_remain_to_pay_locale'=>price(price2num($object->total_ttc - $remain_to_pay, 'MT'), 0, $outputlangs),
|
||||
$array_key.'_remain_to_pay'=>price2num($object->total_ttc - $remain_to_pay, 'MT')
|
||||
// Remain to pay with all known information (except open direct debit requests)
|
||||
$array_key.'_remain_to_pay_locale'=>price(price2num($object->total_ttc - $already_payed_all, 'MT'), 0, $outputlangs),
|
||||
$array_key.'_remain_to_pay'=>price2num($object->total_ttc - $already_payed_all, 'MT')
|
||||
);
|
||||
|
||||
if (method_exists($object, 'getTotalDiscount') && in_array(get_class($object), array('Proposal', 'Commande', 'Facture', 'SupplierProposal', 'CommandeFournisseur', 'FactureFournisseur'))) {
|
||||
|
||||
@ -107,10 +107,12 @@ class DolGraph
|
||||
global $conf;
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor;
|
||||
|
||||
// Some default values for the case it is not defined into the theme later.
|
||||
$this->bordercolor = array(235, 235, 224);
|
||||
$this->datacolor = array(array(120, 130, 150), array(160, 160, 180), array(190, 190, 220));
|
||||
$this->bgcolor = array(235, 235, 224);
|
||||
|
||||
// Load color of the theme
|
||||
$color_file = DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
|
||||
if (is_readable($color_file)) {
|
||||
include $color_file;
|
||||
@ -1415,13 +1417,13 @@ class DolGraph
|
||||
$color = 'rgb(' . $newcolor[0] . ', ' . $newcolor[1] . ', ' . $newcolor[2] . ', 0.9)';
|
||||
$bordercolor = 'rgb(' . $newcolor[0] . ', ' . $newcolor[1] . ', ' . $newcolor[2] . ')';
|
||||
} else { // We do not use a 'group by'
|
||||
if (!empty($this->bordercolor[$i]) && is_array($this->datacolor[$i])) {
|
||||
if (!empty($this->datacolor[$i]) && is_array($this->datacolor[$i])) {
|
||||
$color = 'rgb(' . $this->datacolor[$i][0] . ', ' . $this->datacolor[$i][1] . ', ' . $this->datacolor[$i][2] . ', 0.9)';
|
||||
} else {
|
||||
$color = $this->datacolor[$i];
|
||||
}
|
||||
if (!empty($this->bordercolor[$i]) && is_array($this->bordercolor[$i])) {
|
||||
$color = 'rgb(' . $this->bordercolor[$i][0] . ', ' . $this->bordercolor[$i][1] . ', ' . $this->bordercolor[$i][2] . ', 0.9)';
|
||||
$bordercolor = 'rgb(' . $this->bordercolor[$i][0] . ', ' . $this->bordercolor[$i][1] . ', ' . $this->bordercolor[$i][2] . ', 0.9)';
|
||||
} else {
|
||||
if ($type != 'horizontalBar') {
|
||||
$bordercolor = $color;
|
||||
@ -1429,6 +1431,14 @@ class DolGraph
|
||||
$bordercolor = $this->bordercolor[$i];
|
||||
}
|
||||
}
|
||||
|
||||
// For negative colors, we invert border and background
|
||||
$tmp = str_replace('#', '', $color);
|
||||
if (strpos($tmp, '-') !== false) {
|
||||
$foundnegativecolor++;
|
||||
$bordercolor = str_replace('-', '', $color);
|
||||
$color = '#FFFFFF'; // If $val is '-123'
|
||||
}
|
||||
}
|
||||
if ($i > 0) {
|
||||
$this->stringtoshow .= ', ';
|
||||
|
||||
@ -542,7 +542,6 @@ class FormOther
|
||||
$resql_usr = $this->db->query($sql_usr);
|
||||
if ($resql_usr) {
|
||||
$userstatic = new User($this->db);
|
||||
$showstatus = 1;
|
||||
|
||||
while ($obj_usr = $this->db->fetch_object($resql_usr)) {
|
||||
$userstatic->id = $obj_usr->rowid;
|
||||
|
||||
@ -7228,6 +7228,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$substitutionarray['__ONLINE_PAYMENT_TEXT_AND_URL__'] = ($paymenturl ?str_replace('\n', "\n", $outputlangs->trans("PredefinedMailContentLink", $paymenturl)) : '');
|
||||
$substitutionarray['__ONLINE_PAYMENT_URL__'] = $paymenturl;
|
||||
|
||||
if (is_object($object) && $object->element == 'propal') {
|
||||
$substitutionarray['__ONLINE_SIGN_URL__'] = getOnlineSignatureUrl(0, 'proposal', $object->ref);
|
||||
}
|
||||
if (!empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD) && is_object($object) && $object->element == 'propal') {
|
||||
$substitutionarray['__DIRECTDOWNLOAD_URL_PROPOSAL__'] = $object->getLastMainDocLink($object->element);
|
||||
} else {
|
||||
|
||||
@ -215,15 +215,20 @@ if (!function_exists('dol_loginfunction')) {
|
||||
}
|
||||
|
||||
// Execute hook getLoginPageOptions (for table)
|
||||
$parameters = array('entity' => GETPOST('entity', 'int'));
|
||||
$parameters = array('entity' => GETPOST('entity', 'int'), 'switchentity' => GETPOST('switchentity', 'int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageOptions', $parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$morelogincontent = $hookmanager->resPrint;
|
||||
|
||||
// Execute hook getLoginPageExtraOptions (eg for js)
|
||||
$parameters = array('entity' => GETPOST('entity', 'int'));
|
||||
$parameters = array('entity' => GETPOST('entity', 'int'), 'switchentity' => GETPOST('switchentity', 'int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageExtraOptions', $parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$moreloginextracontent = $hookmanager->resPrint;
|
||||
|
||||
//Redirect after connection
|
||||
$parameters = array('entity' => GETPOST('entity', 'int'), 'switchentity' => GETPOST('switchentity', 'int'));
|
||||
$reshook = $hookmanager->executeHooks('redirectAfterConnection', $parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$php_self = $hookmanager->resPrint;
|
||||
|
||||
// Login
|
||||
$login = (!empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username", "alpha") ? GETPOST("username", "alpha") : $demologin));
|
||||
$password = $demopassword;
|
||||
|
||||
@ -57,7 +57,7 @@ if (!empty($conf->dol_use_jmobile)) {
|
||||
$conf->use_javascript_ajax = 1;
|
||||
}
|
||||
|
||||
$php_self = dol_escape_htmltag($_SERVER['PHP_SELF']);
|
||||
$php_self = empty($php_self) ? dol_escape_htmltag($_SERVER['PHP_SELF']) : $php_self;
|
||||
$php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '';
|
||||
if (!preg_match('/mainmenu=/', $php_self)) {
|
||||
$php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home';
|
||||
|
||||
@ -1957,8 +1957,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
$this->line->desc = $desc;
|
||||
$this->line->ref_supplier = $ref_supplier;
|
||||
|
||||
$this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ?abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative
|
||||
$this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||
$this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ? abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative
|
||||
$this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ? -abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||
|
||||
$this->line->vat_src_code = $vat_src_code;
|
||||
$this->line->tva_tx = $txtva;
|
||||
@ -1967,11 +1967,11 @@ class FactureFournisseur extends CommonInvoice
|
||||
$this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||
|
||||
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva);
|
||||
$this->line->total_localtax1 = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_localtax1) : $total_localtax1);
|
||||
$this->line->total_localtax2 = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_localtax2) : $total_localtax2);
|
||||
$this->line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ttc) : $total_ttc);
|
||||
$this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_tva) : $total_tva); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_localtax1 = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_localtax1) : $total_localtax1); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_localtax2 = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_localtax2) : $total_localtax2); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($total_ttc) : $total_ttc); // For credit note and if qty is negative, total is negative
|
||||
|
||||
$this->line->fk_product = $fk_product;
|
||||
$this->line->product_type = $type;
|
||||
@ -1992,10 +1992,11 @@ class FactureFournisseur extends CommonInvoice
|
||||
// Multicurrency
|
||||
$this->line->fk_multicurrency = $this->fk_multicurrency;
|
||||
$this->line->multicurrency_code = $this->multicurrency_code;
|
||||
$this->line->multicurrency_subprice = $pu_ht_devise;
|
||||
$this->line->multicurrency_total_ht = $multicurrency_total_ht;
|
||||
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
|
||||
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;
|
||||
$this->line->multicurrency_subprice = ($this->type == self::TYPE_CREDIT_NOTE ? -abs($pu_ht_devise) : $pu_ht_devise); // For credit note, unit price always negative, always positive otherwise
|
||||
|
||||
$this->line->multicurrency_total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_ht) : $multicurrency_total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->multicurrency_total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_tva) : $multicurrency_total_tva); // For credit note and if qty is negative, total is negative
|
||||
$this->line->multicurrency_total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ? -abs($multicurrency_total_ttc) : $multicurrency_total_ttc); // For credit note and if qty is negative, total is negative
|
||||
|
||||
if (is_array($array_options) && count($array_options) > 0) {
|
||||
$this->line->array_options = $array_options;
|
||||
|
||||
@ -57,11 +57,6 @@ $domData .= ' data-id="'.$line->id.'"';
|
||||
$domData .= ' data-qty="'.$line->qty.'"';
|
||||
$domData .= ' data-product_type="'.$line->product_type.'"';
|
||||
|
||||
$sign = 1;
|
||||
if (!empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE_SCREEN) && in_array($object->element, array('facture', 'invoice_supplier')) && $object->type == $object::TYPE_CREDIT_NOTE) {
|
||||
$sign = -1;
|
||||
}
|
||||
|
||||
$coldisplay = 0;
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
||||
|
||||
@ -79,7 +79,7 @@ class Odf
|
||||
|
||||
// Create tmp direcoty (will be deleted in destructor)
|
||||
if (!file_exists($this->tmpdir)) {
|
||||
$result=mkdir($this->tmpdir);
|
||||
$result = mkdir($this->tmpdir);
|
||||
}
|
||||
|
||||
// Load zip proxy
|
||||
@ -329,6 +329,7 @@ class Odf
|
||||
$tempHtml = $html;
|
||||
|
||||
while (strlen($tempHtml) > 0) {
|
||||
$matches = array();
|
||||
// Check if the string includes a html tag
|
||||
if (preg_match_all('/<([A-Za-z]+)(?:\s([A-Za-z]+(?:\-[A-Za-z]+)?(?:=(?:".*?")|(?:[0-9]+))))*(?:(?:\s\/>)|(?:>(.*)<\/\1>))/', $tempHtml, $matches)) {
|
||||
$tagOffset = strpos($tempHtml, $matches[0][0]);
|
||||
@ -342,6 +343,7 @@ class Odf
|
||||
$tempHtml = substr($tempHtml, $tagOffset);
|
||||
}
|
||||
// Extract the attribute data from the html tag
|
||||
$explodedAttributes = array();
|
||||
preg_match_all('/([0-9A-Za-z]+(?:="[0-9A-Za-z\:\-\s\,\;\#]*")?)+/', $matches[2][0], $explodedAttributes);
|
||||
$explodedAttributes = array_filter($explodedAttributes[0]);
|
||||
$attributes = array();
|
||||
@ -447,32 +449,6 @@ class Odf
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code
|
||||
*
|
||||
* @return int 0
|
||||
*/
|
||||
public function phpEval()
|
||||
{
|
||||
preg_match_all('/[\{\<]\?(php)?\s+(?P<content>.+)\?[\}\>]/iU', $this->contentXml, $matches); // detecting all {?php code ?} or <?php code ? >
|
||||
$nbfound=count($matches['content']);
|
||||
for ($i=0; $i < $nbfound; $i++) {
|
||||
try {
|
||||
$ob_output = ''; // flush the output for each code. This var will be filled in by the eval($code) and output buffering : any print or echo or output will be redirected into this variable
|
||||
$code = $matches['content'][$i];
|
||||
ob_start();
|
||||
eval($code);
|
||||
$ob_output = ob_get_contents(); // send the content of the buffer into $ob_output
|
||||
$this->contentXml = str_replace($matches[0][$i], $ob_output, $this->contentXml);
|
||||
ob_end_clean();
|
||||
} catch (Exception $e) {
|
||||
ob_end_clean();
|
||||
$this->contentXml = str_replace($matches[0][$i], 'ERROR: there was a problem while evaluating this portion of code, please fix it: '.$e, $this->contentXml);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a template variable as a picture
|
||||
*
|
||||
@ -515,10 +491,12 @@ IMG;
|
||||
|
||||
// Search all possible rows in the document
|
||||
$reg1 = "#<table:table-row[^>]*>(.*)</table:table-row>#smU";
|
||||
$matches = array();
|
||||
preg_match_all($reg1, $this->contentXml, $matches);
|
||||
for ($i = 0, $size = count($matches[0]); $i < $size; $i++) {
|
||||
// Check if the current row contains a segment row.*
|
||||
$reg2 = '#\[!--\sBEGIN\s(row.[\S]*)\s--\](.*)\[!--\sEND\s\\1\s--\]#sm';
|
||||
$matches2 = array();
|
||||
if (preg_match($reg2, $matches[0][$i], $matches2)) {
|
||||
$balise = str_replace('row.', '', $matches2[1]);
|
||||
// Move segment tags around the row
|
||||
@ -665,6 +643,7 @@ IMG;
|
||||
}
|
||||
// $reg = "#\[!--\sBEGIN\s$segment\s--\]<\/text:p>(.*)<text:p\s.*>\[!--\sEND\s$segment\s--\]#sm";
|
||||
$reg = "#\[!--\sBEGIN\s$segment\s--\](.*)\[!--\sEND\s$segment\s--\]#sm";
|
||||
$m = array();
|
||||
if (preg_match($reg, html_entity_decode($this->contentXml), $m) == 0) {
|
||||
throw new OdfException("'".$segment."' segment not found in the document. The tag [!-- BEGIN xxx --] or [!-- END xxx --] is not present into content file.");
|
||||
}
|
||||
@ -1005,6 +984,7 @@ IMG;
|
||||
public function getvalue($valuename)
|
||||
{
|
||||
$searchreg="/\\[".$valuename."\\](.*)\\[\\/".$valuename."\\]/";
|
||||
$matches = array();
|
||||
preg_match($searchreg, $this->contentXml, $matches);
|
||||
$this->contentXml = preg_replace($searchreg, "", $this->contentXml);
|
||||
return $matches[1];
|
||||
|
||||
@ -561,9 +561,11 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
$nbtodClass = '';
|
||||
if ($board->nbtodo > 0) {
|
||||
$nbtodClass = 'badge badge-info';
|
||||
} else {
|
||||
$nbtodClass = 'opacitymedium';
|
||||
}
|
||||
|
||||
$openedDashBoard .= ' <a href="'.$board->url.'" class="info-box-text info-box-text-a">'.$infoName.'<span class="'.$nbtodClass.' classfortooltip" title="'.$board->label.'" >'.$board->nbtodo.'</span>';
|
||||
$openedDashBoard .= '<a href="'.$board->url.'" class="info-box-text info-box-text-a">'.$infoName.'<span class="classfortooltip'.($nbtodClass ? ' '.$nbtodClass : '').'" title="'.$board->label.'" >'.$board->nbtodo.'</span>';
|
||||
if ($textLate) {
|
||||
if ($board->url_late) {
|
||||
$openedDashBoard .= '</a>';
|
||||
|
||||
@ -27,6 +27,8 @@
|
||||
|
||||
delete from llx_c_availability;
|
||||
INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (1, 'AV_NOW', 'Immediate', 1, 10);
|
||||
INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (2, 'AV_1W', '1 week', 1, 20);
|
||||
INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (3, 'AV_2W', '2 weeks', 1, 30);
|
||||
INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (4, 'AV_3W', '3 weeks', 1, 40);
|
||||
INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (2, 'AV_1W', '1 week', 1, 20);
|
||||
INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (3, 'AV_2W', '2 weeks', 1, 30);
|
||||
INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (4, 'AV_3W', '3 weeks', 1, 40);
|
||||
INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (5, 'AV_4W', '4 weeks', 1, 50);
|
||||
|
||||
|
||||
@ -87,6 +87,26 @@ DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', '
|
||||
|
||||
-- For v14
|
||||
|
||||
--Fix bad sign on multicompany column for customer invoice lines
|
||||
UPDATE llx_facturedet SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and subprice > 0) OR (multicurrency_subprice > 0 and subprice < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicompany column for customer invoices
|
||||
UPDATE llx_facture SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facture SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicurrency column for supplier invoice lines
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and pu_ht > 0) OR (multicurrency_subprice > 0 and pu_ht < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and tva > 0) OR (multicurrency_total_tva > 0 and tva < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicompany column for customer invoices
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
|
||||
|
||||
UPDATE llx_c_ticket_type set label = 'Issue or bug' WHERE code = 'ISSUE';
|
||||
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('PROBLEM', '22', 'Problem', 0, 0, NULL);
|
||||
|
||||
|
||||
@ -78,6 +78,26 @@ INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private,
|
||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||
|
||||
|
||||
--Fix bad sign on multicompany column for customer invoice lines
|
||||
UPDATE llx_facturedet SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and subprice > 0) OR (multicurrency_subprice > 0 and subprice < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicompany column for customer invoices
|
||||
UPDATE llx_facture SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facture SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicurrency column for supplier invoice lines
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and pu_ht > 0) OR (multicurrency_subprice > 0 and pu_ht < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and tva > 0) OR (multicurrency_total_tva > 0 and tva < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicompany column for customer invoices
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
|
||||
|
||||
-- v15
|
||||
|
||||
ALTER TABLE llx_c_partnership_type ADD UNIQUE INDEX uk_c_partnership_type(entity, code);
|
||||
|
||||
@ -501,6 +501,25 @@ UPDATE llx_accounting_bookkeeping set date_creation = tms where date_creation IS
|
||||
-- UPDATE llx_facturedet_rec set label = NULL WHERE label IS NOT NULL;
|
||||
|
||||
|
||||
--Fix bad sign on multicompany column for customer invoice lines
|
||||
UPDATE llx_facturedet SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and subprice > 0) OR (multicurrency_subprice > 0 and subprice < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facturedet SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicompany column for customer invoices
|
||||
UPDATE llx_facture SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facture SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicurrency column for supplier invoice lines
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and pu_ht > 0) OR (multicurrency_subprice > 0 and pu_ht < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and tva > 0) OR (multicurrency_total_tva > 0 and tva < 0));
|
||||
UPDATE llx_facture_fourn_det SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
--Fix bad sign on multicompany column for customer invoices
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0));
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0));
|
||||
UPDATE llx_facture_fourn SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0));
|
||||
|
||||
|
||||
UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL;
|
||||
|
||||
|
||||
@ -241,10 +241,12 @@ RemainderToTake=Remaining amount to take
|
||||
RemainderToTakeMulticurrency=Remaining amount to take, original currency
|
||||
RemainderToPayBack=Remaining amount to refund
|
||||
RemainderToPayBackMulticurrency=Remaining amount to refund, original currency
|
||||
NegativeIfExcessRefunded=negative if excess refunded
|
||||
Rest=Pending
|
||||
AmountExpected=Amount claimed
|
||||
ExcessReceived=Excess received
|
||||
ExcessReceivedMulticurrency=Excess received, original currency
|
||||
NegativeIfExcessReceived=negative if excess received
|
||||
ExcessPaid=Excess paid
|
||||
ExcessPaidMulticurrency=Excess paid, original currency
|
||||
EscompteOffered=Discount offered (payment before term)
|
||||
|
||||
@ -318,7 +318,7 @@ BoxTicketLastXDays=Number of new tickets by days the last %s days
|
||||
BoxTicketLastXDayswidget = Number of new tickets by days the last X days
|
||||
BoxNoTicketLastXDays=No new tickets the last %s days
|
||||
BoxNumberOfTicketByDay=Number of new tickets by day
|
||||
BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets
|
||||
BoxNewTicketVSClose=Number of tickets versus closed tickets (today)
|
||||
TicketCreatedToday=Ticket created today
|
||||
TicketClosedToday=Ticket closed today
|
||||
KMFoundForTicketGroup=We found topics and FAQs that may answers your question, thanks to check them before submitting the ticket
|
||||
|
||||
@ -173,7 +173,10 @@ print '<td>'.$langs->trans("MovementLabel").'</td>';
|
||||
print '<td>';
|
||||
print '<input type="text" name="label" class="minwidth300" value="'.$valformovementlabel.'">';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("InventoryCode").'</td><td><input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(GETPOSTISSET("inventorycode") ? GETPOST("inventorycode", 'alpha') : dol_print_date(dol_now(), '%y%m%d%H%M%S')).'"></td>';
|
||||
print '<td>'.$langs->trans("InventoryCode").'</td>';
|
||||
print '<td>';
|
||||
print '<input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(GETPOSTISSET("inventorycode") ? GETPOST("inventorycode", 'alpha') : dol_print_date(dol_now(), '%Y%m%d%H%M%S')).'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -124,13 +124,16 @@ if (!empty($conf->productbatch->enabled) &&
|
||||
}
|
||||
|
||||
// Label
|
||||
$valformovementlabel = (GETPOST("label") ?GETPOST("label") : $langs->trans("MovementTransferStock", $productref));
|
||||
$valformovementlabel = (GETPOST("label") ? GETPOST("label") : $langs->trans("MovementTransferStock", $productref));
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("MovementLabel").'</td>';
|
||||
print '<td>';
|
||||
print '<input type="text" name="label" class="minwidth300" value="'.dol_escape_htmltag($valformovementlabel).'">';
|
||||
print '<input type="text" name="label" class="minwidth300" value="'.$valformovementlabel.'">';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("InventoryCode").'</td>';
|
||||
print '<td>';
|
||||
print '<input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(GETPOSTISSET("inventorycode") ? GETPOST("inventorycode", 'alpha') : dol_print_date(dol_now(), '%Y%m%d%H%M%S')).'">';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("InventoryCode").'</td><td><input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(GETPOSTISSET("inventorycode") ? GETPOST("inventorycode", 'alpha') : dol_print_date(dol_now(), '%y%m%d%H%M%S')).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -302,7 +302,9 @@ print $form->selectarray('year', $arrayyears, $year, 0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="center" colspan="2"><input type="submit" name="submit" class="button small" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
@ -369,10 +371,12 @@ $stringtoshow .= '</td></tr></table>';
|
||||
|
||||
print $stringtoshow;
|
||||
|
||||
print '</div></div>';
|
||||
|
||||
print '</div></div></div>';
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -172,7 +172,9 @@ print $form->selectarray('year', $arrayyears, $year, 0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="center" colspan="2"><input type="submit" name="submit" class="button small" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
@ -190,13 +192,13 @@ foreach ($data_all_year as $val) {
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '</tr>';
|
||||
$oldyear = $year;
|
||||
@ -220,8 +222,11 @@ print $stringtoshow;
|
||||
|
||||
|
||||
print '</div></div>';
|
||||
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -1220,7 +1220,7 @@ select.flat.selectlimit {
|
||||
}
|
||||
|
||||
/* Styles for amount on card */
|
||||
table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaintopay {
|
||||
table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaintopay, table.paymenttable td.amountremaintopayback {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@ -1521,11 +1521,11 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
}
|
||||
|
||||
/* Set a width. Note: add also a max-width, for example maxwidth500, that will be used in priority */
|
||||
.widthcentpercentminusx {
|
||||
select.widthcentpercentminusx, span.widthcentpercentminusx:not(.select2-selection), input.widthcentpercentminusx {
|
||||
width: calc(100% - 50px) !important;
|
||||
display: inline-block;
|
||||
}
|
||||
.widthcentpercentminusxx {
|
||||
select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-selection), input.widthcentpercentminusxx {
|
||||
width: calc(100% - 70px) !important;
|
||||
display: inline-block;
|
||||
}
|
||||
@ -1987,7 +1987,7 @@ div.fichehalfleft {
|
||||
print "float: ".$left.";\n";
|
||||
} ?>
|
||||
<?php if ($conf->browser->layout != 'phone') {
|
||||
print "width: calc(50% - 10px);\n";
|
||||
print "width: calc(50% - 14px);\n";
|
||||
} ?>
|
||||
}
|
||||
div.fichehalfright {
|
||||
@ -1995,7 +1995,7 @@ div.fichehalfright {
|
||||
print "float: ".$right.";\n";
|
||||
} ?>
|
||||
<?php if ($conf->browser->layout != 'phone') {
|
||||
print "width: calc(50% - 10px);\n";
|
||||
print "width: calc(50% - 14px);\n";
|
||||
} ?>
|
||||
}
|
||||
div.fichehalfright {
|
||||
@ -3829,11 +3829,12 @@ div.liste_titre_bydiv {
|
||||
border-top-color: var(--colortopbordertitle1);
|
||||
border-top-style: solid;
|
||||
|
||||
box-shadow: none;
|
||||
border-collapse: collapse;
|
||||
display: table;
|
||||
padding: 2px 0px 2px 0;
|
||||
width: calc(100% - 1px);
|
||||
box-shadow: none;
|
||||
/*width: calc(100% - 1px); 1px more, i don't know why so i remove */
|
||||
width: calc(100%);
|
||||
}
|
||||
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr, tagtr.liste_titre
|
||||
{
|
||||
|
||||
2
test/phpunit/testvirus.txt
Normal file
2
test/phpunit/testvirus.txt
Normal file
@ -0,0 +1,2 @@
|
||||
# Remove this line and replace the ABC with X50 to get a file that is detected by antiviruses.
|
||||
ABC!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
|
||||
Loading…
Reference in New Issue
Block a user