Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b2614259e7
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2012-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -668,7 +669,7 @@ if ($rowid > 0)
|
||||
{
|
||||
$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,";
|
||||
$sql.= " c.rowid as crowid, c.subscription,";
|
||||
$sql.= " c.datec,";
|
||||
$sql.= " c.datec, c.fk_type as cfk_type,";
|
||||
$sql.= " c.dateadh as dateh,";
|
||||
$sql.= " c.datef,";
|
||||
$sql.= " c.fk_bank,";
|
||||
@ -693,6 +694,7 @@ if ($rowid > 0)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder);
|
||||
print '<td class="center">'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Type").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateStart").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateEnd").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
@ -703,6 +705,7 @@ if ($rowid > 0)
|
||||
print "</tr>\n";
|
||||
|
||||
$accountstatic=new Account($db);
|
||||
$adht = new AdherentType($db);
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
@ -711,9 +714,20 @@ if ($rowid > 0)
|
||||
$subscriptionstatic->ref=$objp->crowid;
|
||||
$subscriptionstatic->id=$objp->crowid;
|
||||
|
||||
if ($objp->cfk_type > 0)
|
||||
{
|
||||
$adht->fetch($objp->cfk_type);
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->datec), 'dayhour')."</td>\n";
|
||||
print '<td class="center">';
|
||||
if ($objp->cfk_type > 0)
|
||||
{
|
||||
print $adht->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->dateh), 'day')."</td>\n";
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day')."</td>\n";
|
||||
print '<td class="right">'.price($objp->subscription).'</td>';
|
||||
|
||||
@ -431,7 +431,7 @@ if ($rowid > 0)
|
||||
print '</tr>';
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib($object->morphy).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>';
|
||||
|
||||
@ -1302,42 +1302,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
}
|
||||
}
|
||||
|
||||
// Accountancy (simple)
|
||||
if (! empty($conf->comptabilite->enabled))
|
||||
{
|
||||
$langs->load("compta");
|
||||
|
||||
// Bilan, resultats
|
||||
$newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
|
||||
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) {
|
||||
$newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire);
|
||||
/* On verra ca avec module compabilite expert
|
||||
$newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->rights->compta->resultat->lire);
|
||||
*/
|
||||
$newmenu->add("/compta/stats/index.php?leftmenu=report", $langs->trans("ReportTurnover"), 1, $user->rights->compta->resultat->lire);
|
||||
|
||||
/*
|
||||
$newmenu->add("/compta/stats/cumul.php?leftmenu=report","Cumule",2,$user->rights->compta->resultat->lire);
|
||||
if (! empty($conf->propal->enabled)) {
|
||||
$newmenu->add("/compta/stats/prev.php?leftmenu=report","Previsionnel",2,$user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->rights->compta->resultat->lire);
|
||||
}
|
||||
*/
|
||||
$newmenu->add("/compta/stats/casoc.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/stats/cabyuser.php?leftmenu=report", $langs->trans("ByUsers"), 2, $user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report", $langs->trans("ByProductsAndServices"), 2, $user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/stats/byratecountry.php?leftmenu=report", $langs->trans("ByVatRate"), 2, $user->rights->compta->resultat->lire);
|
||||
|
||||
// Journaux
|
||||
$newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 50);
|
||||
$newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 51);
|
||||
}
|
||||
//if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journaux"),1,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);
|
||||
}
|
||||
|
||||
// Configuration
|
||||
$newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1);
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) {
|
||||
@ -1369,8 +1333,44 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
$newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_closure', 120);
|
||||
$newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_export', 130);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Accountancy (simple)
|
||||
if (! empty($conf->comptabilite->enabled))
|
||||
{
|
||||
$langs->load("compta");
|
||||
|
||||
// Bilan, resultats
|
||||
$newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
|
||||
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) {
|
||||
$newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire);
|
||||
/* On verra ca avec module compabilite expert
|
||||
$newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->rights->compta->resultat->lire);
|
||||
*/
|
||||
$newmenu->add("/compta/stats/index.php?leftmenu=report", $langs->trans("ReportTurnover"), 1, $user->rights->compta->resultat->lire);
|
||||
|
||||
/*
|
||||
$newmenu->add("/compta/stats/cumul.php?leftmenu=report","Cumule",2,$user->rights->compta->resultat->lire);
|
||||
if (! empty($conf->propal->enabled)) {
|
||||
$newmenu->add("/compta/stats/prev.php?leftmenu=report","Previsionnel",2,$user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/stats/comp.php?leftmenu=report","Transforme",2,$user->rights->compta->resultat->lire);
|
||||
}
|
||||
*/
|
||||
$newmenu->add("/compta/stats/casoc.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/stats/cabyuser.php?leftmenu=report", $langs->trans("ByUsers"), 2, $user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report", $langs->trans("ByProductsAndServices"), 2, $user->rights->compta->resultat->lire);
|
||||
$newmenu->add("/compta/stats/byratecountry.php?leftmenu=report", $langs->trans("ByVatRate"), 2, $user->rights->compta->resultat->lire);
|
||||
|
||||
// Journaux
|
||||
$newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 50);
|
||||
$newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 51);
|
||||
}
|
||||
//if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journaux"),1,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);
|
||||
}
|
||||
|
||||
// Assets
|
||||
if (! empty($conf->asset->enabled))
|
||||
{
|
||||
|
||||
@ -298,11 +298,23 @@ if ($action == 'create' && !$error) {
|
||||
if ($socid)
|
||||
$res = $soc->fetch($socid);
|
||||
if ($res) {
|
||||
$cond_reglement_id = $soc->cond_reglement_id;
|
||||
$mode_reglement_id = $soc->mode_reglement_id;
|
||||
$cond_reglement_id = $soc->cond_reglement_supplier_id;
|
||||
$mode_reglement_id = $soc->mode_reglement_supplier_id;
|
||||
}
|
||||
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ? - 1 : '';
|
||||
|
||||
$objectsrc = new CommandeFournisseur($db);
|
||||
$listoforders = array();
|
||||
foreach ($selected as $sel) {
|
||||
$result = $objectsrc->fetch($sel);
|
||||
if ($result > 0) {
|
||||
$listoforders[] = $objectsrc->ref;
|
||||
}
|
||||
|
||||
if (empty($cond_reglement_id)) $cond_reglement_id = $objectsrc->cond_reglement_id;
|
||||
if (empty($mode_reglement_id)) $mode_reglement_id = $objectsrc->mode_reglement_id;
|
||||
}
|
||||
|
||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
@ -350,15 +362,6 @@ if ($action == 'create' && !$error) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
$objectsrc = new CommandeFournisseur($db);
|
||||
$listoforders = array ();
|
||||
foreach ($selected as $sel) {
|
||||
$result = $objectsrc->fetch($sel);
|
||||
if ($result > 0) {
|
||||
$listoforders[] = $objectsrc->ref;
|
||||
}
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters = array (
|
||||
'objectsrc' => $objectsrc,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user