diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php
index 07113231bcc..fa99e2c202b 100644
--- a/htdocs/admin/payment.php
+++ b/htdocs/admin/payment.php
@@ -39,6 +39,8 @@ $label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');
$type='invoice';
+if (empty($conf->global->PAYMENT_ADDON)) $conf->global->PAYMENT_ADDON = 'mod_payment_cicada.php';
+
/*
* Actions
@@ -62,11 +64,13 @@ if ($action == 'updateMask')
}
}
- if ($action == 'setmod')
+if ($action == 'setmod')
{
dolibarr_set_const($db, "PAYMENT_ADDON",$value,'chaine',0,'',$conf->entity);
}
+
+
/*
* View
*/
@@ -88,7 +92,7 @@ dol_fiche_head($head, 'payment', $langs->trans("Invoices"), 0, 'invoice');
* Numbering module
*/
-print load_fiche_titre($langs->trans("PaymentsNumberingModule"));
+print load_fiche_titre($langs->trans("PaymentsNumberingModule"), '', '');
print '
';
print '';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index b3f3bd25c17..c8bc79c1928 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1827,6 +1827,7 @@ $form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
$formmargin = new FormMargin($db);
+$paymentstatic=new Paiement($db);
$bankaccountstatic = new Account($db);
if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
@@ -3125,6 +3126,7 @@ else if ($id > 0 || ! empty($ref))
// List of payments already done
print '
';
print '| ' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . ' | ';
+ print '' . $langs->trans('Date') . ' | ';
print '' . $langs->trans('Type') . ' | ';
if (! empty($conf->banque->enabled))
print '' . $langs->trans('BankAccount') . ' | ';
@@ -3135,10 +3137,10 @@ else if ($id > 0 || ! empty($ref))
$var = true;
// Payments already done (from payment on this invoice)
- $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,';
+ $sql = 'SELECT p.datep as dp, p.ref, p.num_paiement, p.rowid, p.fk_bank,';
$sql .= ' c.code as payment_code, c.libelle as payment_label,';
$sql .= ' pf.amount,';
- $sql .= ' ba.rowid as baid, ba.ref, ba.label';
+ $sql .= ' ba.rowid as baid, ba.ref as baref, ba.label';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'c_paiement as c, ' . MAIN_DB_PREFIX . 'paiement_facture as pf, ' . MAIN_DB_PREFIX . 'paiement as p';
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank as b ON p.fk_bank = b.rowid';
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank_account as ba ON b.fk_account = ba.rowid';
@@ -3160,15 +3162,21 @@ else if ($id > 0 || ! empty($ref))
$objp = $db->fetch_object($result);
$var = ! $var;
print '
| ';
- print '' . img_object($langs->trans('ShowPayment'), 'payment') . ' ';
- print dol_print_date($db->jdate($objp->dp), 'day') . ' | ';
+ $paymentstatic->id=$objp->rowid;
+ $paymentstatic->datepaye=$db->jdate($objp->dp);
+ $paymentstatic->ref=$objp->ref;
+ $paymentstatic->num_paiement=$objp->num_paiement;
+ $paymentstatic->payment_code=$objp->payment_code;
+ print $paymentstatic->getNomUrl(1);
+ print '';
+ print ''.dol_print_date($db->jdate($objp->dp), 'day') . ' | ';
$label = ($langs->trans("PaymentType" . $objp->payment_code) != ("PaymentType" . $objp->payment_code)) ? $langs->trans("PaymentType" . $objp->payment_code) : $objp->payment_label;
print '' . $label . ' ' . $objp->num_paiement . ' | ';
if (! empty($conf->banque->enabled))
{
$bankaccountstatic->id = $objp->baid;
- $bankaccountstatic->ref = $objp->ref;
- $bankaccountstatic->label = $objp->ref;
+ $bankaccountstatic->ref = $objp->baref;
+ $bankaccountstatic->label = $objp->baref;
print '';
if ($bankaccountstatic->id)
print $bankaccountstatic->getNomUrl(1, 'transactions');
diff --git a/htdocs/index.php b/htdocs/index.php
index 3e2fa24eed0..0bb3b41ffb2 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -121,7 +121,8 @@ $boxinfo.= ' | ';
$boxinfo.= "
\n";
$boxinfo.= "
\n";
$boxinfo.= '';
-print $boxinfo;
+//print $boxinfo;
+
/*
* Dashboard Dolibarr states (statistics)
@@ -309,7 +310,7 @@ if (empty($user->societe_id))
$boxstat.='';
$boxstat.='';
}
-print $boxstat;
+//print $boxstat;
print '';
@@ -323,6 +324,7 @@ $showweather=empty($conf->global->MAIN_DISABLE_METEO)?1:0;
$dashboardlines=array();
$boxwork='';
+$boxwork.='
';
$boxwork.='
'."\n";
$boxwork.='';
$boxwork.='| '.$langs->trans("DolibarrWorkBoard").' | ';
@@ -514,8 +516,9 @@ foreach($valid_dashboardlines as $board)
}
$boxwork.='
'; // End table array of working board
+$boxwork.='
';
-print $boxwork;
+//print $boxwork;
print '
';
@@ -531,10 +534,13 @@ $boxlist.='| '."\n";
$boxlist.=' ';
+$boxlist.=$boxinfo;
+$boxlist.=$boxstat;
$boxlist.=$resultboxes['boxlista'];
$boxlist.= ' ';
+$boxlist.=$boxwork;
$boxlist.=$resultboxes['boxlistb'];
$boxlist.= ' ';
@@ -592,8 +598,7 @@ $db->close();
/**
* Show weather logo. Logo to show depends on $totallate and values for
- * $conf->global->MAIN_METEO_OFFSET
- * $conf->global->MAIN_METEO_GAP
+ * $conf->global->MAIN_METEO_LEVELx
*
* @param int $totallate Nb of element late
* @param string $text Text to show on logo
@@ -606,13 +611,12 @@ function showWeather($totallate,$text,$options)
$out='';
$offset=0;
- $cursor=10; // By default
- //if (! empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET;
- //if (! empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP;
+ $factor=10; // By default
+
$level0=$offset; if (! empty($conf->global->MAIN_METEO_LEVEL0)) $level0=$conf->global->MAIN_METEO_LEVEL0;
- $level1=$offset+1*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL1)) $level1=$conf->global->MAIN_METEO_LEVEL1;
- $level2=$offset+2*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL2)) $level2=$conf->global->MAIN_METEO_LEVEL2;
- $level3=$offset+3*$cursor; if (! empty($conf->global->MAIN_METEO_LEVEL3)) $level3=$conf->global->MAIN_METEO_LEVEL3;
+ $level1=$offset+1*$factor; if (! empty($conf->global->MAIN_METEO_LEVEL1)) $level1=$conf->global->MAIN_METEO_LEVEL1;
+ $level2=$offset+2*$factor; if (! empty($conf->global->MAIN_METEO_LEVEL2)) $level2=$conf->global->MAIN_METEO_LEVEL2;
+ $level3=$offset+3*$factor; if (! empty($conf->global->MAIN_METEO_LEVEL3)) $level3=$conf->global->MAIN_METEO_LEVEL3;
if ($totallate <= $level0) $out.=img_picto_common($text,'weather/weather-clear.png',$options);
if ($totallate > $level0 && $totallate <= $level1) $out.=img_picto_common($text,'weather/weather-few-clouds.png',$options);
|