2
0
forked from Wavyzz/dolibarr

Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2014-09-18 17:54:24 +02:00
18 changed files with 290 additions and 46 deletions

View File

@@ -74,6 +74,7 @@ For users:
- Fix: [ bug #1506, #1507 ] ECM trigger error problem
- Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message
- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe.
- New: Add dunning into accountancy report
New experimental module:
- New: Module Accounting Expert to manage accountancy

View File

@@ -137,11 +137,11 @@ else {
print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey'));
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" />';
print '</form>';
print '<a href="./card.php?action=create" class="butAction">' . $langs->trans("NewAccountingMvt") . '</a>';
print '<a href="./card.php?action=create" class="butAction">' . $langs->trans("NewAccountingMvt") . '</a></div>';
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';

View File

@@ -132,7 +132,7 @@ if ($result) {
$cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
$cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
$cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
$cptsociale = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
$tabpay = array ();
$tabbq = array ();
@@ -173,21 +173,26 @@ if ($result) {
$tabtype[$obj->rowid] = $links[$key]['type'];
if ($links[$key]['type'] == 'payment') {
if ($links[$key]['type'] == 'payment')
{
$paymentstatic->id = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
} else if ($links[$key]['type'] == 'payment_supplier') {
}
else if ($links[$key]['type'] == 'payment_supplier')
{
$paymentsupplierstatic->id = $links[$key]['url_id'];
$paymentsupplierstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
} else if ($links[$key]['type'] == 'company') {
}
else if ($links[$key]['type'] == 'company')
{
$societestatic->id = $links[$key]['url_id'];
$societestatic->nom = $links[$key]['label'];
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
} else if ($links[$key]['type'] == 'sc') {
}
else if ($links[$key]['type'] == 'sc')
{
$chargestatic->id = $links[$key]['url_id'];
$chargestatic->ref = $links[$key]['url_id'];
@@ -196,7 +201,9 @@ if ($result) {
if ($reg[1] == 'socialcontribution')
$reg[1] = 'SocialContribution';
$chargestatic->lib = $langs->trans($reg[1]);
} else {
}
else
{
$chargestatic->lib = $links[$key]['label'];
}
$chargestatic->ref = $chargestatic->lib;
@@ -211,29 +218,33 @@ if ($result) {
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
if ($resultmid)
{
$objmid = $db->fetch_object($resultmid);
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
}
} else if ($links[$key]['type'] == 'payment_vat') {
}
else if ($links[$key]['type'] == 'payment_vat')
{
$paymentvatstatic->id = $links[$key]['url_id'];
$paymentvatstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
} else if ($links[$key]['type'] == 'payment_salary') {
}
else if ($links[$key]['type'] == 'payment_salary')
{
$paymentsalstatic->id = $links[$key]['url_id'];
$paymentsalstatic->ref = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
$tabtp[$obj->rowid][$cptsociale] += $obj->amount;
} else if ($links[$key]['type'] == 'banktransfert') {
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
}
else if ($links[$key]['type'] == 'banktransfert')
{
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
}
/*else {
$tabtp [$obj->rowid] [$cptsociale] += $obj->amount;
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
}*/
}
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
@@ -477,14 +488,14 @@ if ($action == 'export_csv') {
llxHeader('', $langs->trans("BankJournal"));
$nom = $langs->trans("BankJournal");
$nomlink = '';
$namereport = $langs->trans("BankJournal");
$namelink = '';
$periodlink = '';
$exportlink = '';
$builddate = time();
$description = $langs->trans("DescBankJournal") . '<br>';
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
report_header($namereport, $namelink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* 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
@@ -209,38 +209,42 @@ class Don extends CommonObject
*/
function check($minimum=0)
{
global $langs;
$langs->load('main');
$langs->load('companies');
$err = 0;
if (dol_strlen(trim($this->societe)) == 0)
{
if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0)
{
$error_string[$err] = "Vous devez saisir vos nom et prenom ou le nom de votre societe.";
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Company').'/'.$langs->trans('Firstname').'-'.$langs->trans('Lastname'));
$err++;
}
}
if (dol_strlen(trim($this->address)) == 0)
{
$error_string[$err] = "L'adresse saisie est invalide";
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Address'));
$err++;
}
if (dol_strlen(trim($this->zip)) == 0)
{
$error_string[$err] = "Le code postal saisi est invalide";
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Zip'));
$err++;
}
if (dol_strlen(trim($this->town)) == 0)
{
$error_string[$err] = "La ville saisie est invalide";
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Town'));
$err++;
}
if (dol_strlen(trim($this->email)) == 0)
{
$error_string[$err] = "L'email saisi est invalide";
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('EMail'));
$err++;
}
@@ -252,7 +256,7 @@ class Don extends CommonObject
{
if (!isset($map[substr($this->amount, $i, 1)] ))
{
$error_string[$err] = "Le montant du don contient un/des caractere(s) invalide(s)";
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
$err++;
$amount_invalid = 1;
break;
@@ -263,14 +267,14 @@ class Don extends CommonObject
{
if ($this->amount == 0)
{
$error_string[$err] = "Le montant du don est null";
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
$err++;
}
else
{
if ($this->amount < $minimum && $minimum > 0)
{
$error_string[$err] = "Le montant minimum du don est de $minimum";
$error_string[$err] = $langs->trans('MinimumAmount',$langs->trans('$minimum'));
$err++;
}
}

View File

@@ -372,6 +372,17 @@ $search_montant_ht = GETPOST("search_montant_ht");
$search_montant_ttc = GETPOST("search_montant_ttc");
$late = GETPOST("late");
// Do we click on purge search criteria ?
if (GETPOST("button_removefilter_x"))
{
$search_ref='';
$search_refcustomer='';
$search_societe='';
$search_paymentmode='';
$search_montant_ht='';
$search_montant_ttc='';
}
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
@@ -571,6 +582,7 @@ if ($resql)
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '</td>';
if (empty($mode))
{

View File

@@ -327,6 +327,7 @@ if ($resql)
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="10" name="search_montant_ttc" value="'.$search_montant_ttc.'"></td>';
print '<td class="liste_titre" align="right">&nbsp;</td>';
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print "</td></tr>\n";
if ($num > 0)

View File

@@ -4,6 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* 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
@@ -33,6 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
$langs->load("bills");
$langs->load("donation");
$langs->load("salaries");
$date_startmonth=GETPOST('date_startmonth');
$date_startday=GETPOST('date_startday');
@@ -555,7 +558,7 @@ if (! empty($date_start) && ! empty($date_end))
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
$sql.= " ORDER BY u.firstname";
dol_syslog("get payment salaries sql=".$sql);
dol_syslog("get payment salaries");
$result=$db->query($sql);
$subtotal_ht = 0;
$subtotal_ttc = 0;
@@ -598,6 +601,64 @@ else
{
dol_print_error($db);
}
/*
* Dunning
*/
print '<tr><td colspan="4">'.$langs->trans("Donation").'</td></tr>';
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
$sql.= " WHERE p.entity = ".$conf->entity;
$sql.= " AND fk_statut=2";
if (! empty($date_start) && ! empty($date_end))
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
$sql.= " GROUP BY p.societe, p.firstname, p.lastname";
$sql.= " ORDER BY p.societe, p.firstname, p.lastname";
dol_syslog("get dunning");
$result=$db->query($sql);
$subtotal_ht = 0;
$subtotal_ttc = 0;
if ($result)
{
$num = $db->num_rows($result);
$var=true;
$i = 0;
if ($num)
{
while ($i < $num)
{
$obj = $db->fetch_object($result);
$total_ht += $obj->amount;
$total_ttc += $obj->amount;
$subtotal_ht -= $obj->amount;
$subtotal_ttc -= $obj->amount;
$var = !$var;
print "<tr ".$bc[$var]."><td>&nbsp;</td>";
print "<td>".$langs->trans("Donation")." <a href=\"".DOL_URL_ROOT."/compta/dons/liste.php?search_company=".$obj->nom."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->nom. " ".$obj->firstname." ".$obj->lastname."</a></td>\n";
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price($obj->amount).'</td>';
print '<td align="right">'.price($obj->amount).'</td>';
print '</tr>';
$i++;
}
}
else
{
$var = !$var;
print "<tr ".$bc[$var]."><td>&nbsp;</td>";
print '<td colspan="3">'.$langs->trans("None").'</td>';
print '</tr>';
}
}
else
{
dol_print_error($db);
}
print '<tr class="liste_total">';
if ($modecompta == 'CREANCES-DETTES')
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';

View File

@@ -4,6 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* 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
@@ -480,7 +481,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
$sql.= " WHERE p.entity = ".$conf->entity;
$sql.= " GROUP BY p.label, dm";
dol_syslog("get social salaries payments sql=".$sql);
dol_syslog("get social salaries payments");
$result=$db->query($sql);
if ($result)
{
@@ -508,6 +509,45 @@ else
dol_print_error($db);
}
/*
* get dunning paiement
*/
$subtotal_ht = 0;
$subtotal_ttc = 0;
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
$sql.= " WHERE p.entity = ".$conf->entity;
$sql.= " AND fk_statut=2";
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
dol_syslog("get social salaries payments");
$result=$db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$var=false;
$i = 0;
if ($num)
{
while ($i < $num)
{
$obj = $db->fetch_object($result);
if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0;
$encaiss[$obj->dm] += $obj->amount;
if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0;
$encaiss_ttc[$obj->dm] += $obj->amount;
$i++;
}
}
}
else
{
dol_print_error($db);
}
/*
* Show result array
*/

View File

@@ -685,7 +685,7 @@ class FormMail
* @param DoliDB $db Database handler
* @param string $type_template Get message for key module
* @param string $user Use template public or limited to this user
* @para Translate $outputlangs Output lang object
* @param Translate $outputlangs Output lang object
* @return array array('topic'=>,'content'=>,..)
*/
private function getEMailTemplate($db, $type_template, $user, $outputlangs)

View File

@@ -2253,6 +2253,47 @@ function img_phone($titlealt = 'default', $option = 0)
return img_picto($titlealt, $img);
}
/**
* Show search logo
*
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
* @param string $other Add more attributes on img
* @return string Retourne tag img
*/
function img_search($titlealt = 'default', $other = '')
{
global $conf, $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Search');
$img = img_picto($titlealt, 'search.png', $other, false, 1);
$input = '<input type="image" class="liste_titre" name="button_search" src="'.$img.'" ';
$input.= 'value="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'" >';
return $input;
}
/**
* Show search logo
*
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
* @param string $other Add more attributes on img
* @return string Retourne tag img
*/
function img_searchclear($titlealt = 'default', $other = '')
{
global $conf, $langs;
if ($titlealt == 'default') $titlealt = $langs->trans('Search');
$img = img_picto($titlealt, 'searchclear.png', $other, false, 1);
$input = '<input type="image" class="liste_titre" name="button_removefilter" src="'.$img.'" ';
$input.= 'value="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'" >';
return $input;
}
/**
* Show information for admin users

View File

@@ -642,6 +642,7 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
$sortfield='';
$sortorder='';
$project_year_filter=0;
$title=$langs->trans("Project");
if ($statut == 0) $title=$langs->trans("ProjectDraft");
@@ -681,6 +682,17 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
{
$sql.= " AND p.fk_statut = ".$statut;
}
if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) {
$project_year_filter = GETPOST("project_year_filter");
//Check if empty or invalid year. Wildcard ignores the sql check
if ($project_year_filter != "*") {
if (empty($project_year_filter) || !ctype_digit($project_year_filter)) { //
$project_year_filter = date("Y");
}
$sql.= " AND (p.dateo IS NULL OR p.dateo <= ".$db->idate(dol_get_last_day($project_year_filter,12,false)).")";
$sql.= " AND (p.datee IS NULL OR p.datee >= ".$db->idate(dol_get_first_day($project_year_filter,1,false)).")";
}
}
$sql.= " GROUP BY p.rowid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut";
$sql.= " ORDER BY p.title, p.ref";
@@ -724,6 +736,19 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
{
dol_print_error($db);
}
print "</table>";
if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) {
//Add the year filter input
print '<table width="100%">';
print '<tr>';
print '<td>'.$langs->trans("Year").'</td>';
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">';
print '<td style="text-align:right"><input type="text" size="4" class="flat" name="project_year_filter" value="'.$project_year_filter.'"/>';
print '</form>';
print "</tr>\n";
print '</table>';
}
}

View File

@@ -918,7 +918,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
// Grand livre
$newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookkeeping');
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire);
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/balancebymonth.php.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/balancebymonth.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
// Accountancy journals
if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy')

View File

@@ -34,6 +34,10 @@ $expeditionid = GETPOST('id','int');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'expedition',$expeditionid,'');
$search_ref_exp = GETPOST("search_ref_exp");
$search_ref_liv = GETPOST('search_ref_liv');
$search_societe = GETPOST("search_societe");
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
@@ -47,6 +51,13 @@ if (! $sortfield) $sortfield="e.ref";
if (! $sortorder) $sortorder="DESC";
$limit = $conf->liste_limit;
// Do we click on purge search criteria ?
if (GETPOST("button_removefilter_x"))
{
$search_ref_exp='';
$search_ref_liv='';
$search_societe='';
}
/*
* View
@@ -79,10 +90,9 @@ if ($socid)
{
$sql.= " AND e.fk_soc = ".$socid;
}
if (GETPOST('sf_ref','alpha'))
{
$sql.= " AND e.ref like '%".$db->escape(GETPOST('sf_ref','alpha'))."%'";
}
if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp);
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1,$offset);
@@ -94,7 +104,10 @@ if ($resql)
$expedition = new Expedition($db);
$param="&amp;socid=$socid";
$param="";
if ($search_ref_exp) $param.= "&amp;search_ref_exp=".$search_ref_exp;
if ($search_ref_liv) $param.= "&amp;search_ref_liv=".$search_ref_liv;
if ($search_societe) $param.= "&amp;search_societe=".$search_societe;
print_barre_liste($langs->trans('ListOfSendings'), $page, "liste.php",$param,$sortfield,$sortorder,'',$num);
@@ -103,14 +116,44 @@ if ($resql)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),"liste.php","e.ref","",$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),"liste.php","s.nom", "", $param,'align="left"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateDeliveryPlanned"),"liste.php","e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Ref"),"ship2bill.php","e.ref","",$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),"ship2bill.php","s.nom", "", $param,'align="left"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateDeliveryPlanned"),"ship2bill.php","e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder);
if($conf->livraison_bon->enabled) {
print_liste_field_titre($langs->trans("DateReceived"),"liste.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DeliveryOrder"),"ship2bill.php","e.date_expedition","",$param, '',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateReceived"),"ship2bill.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder);
}
print_liste_field_titre($langs->trans("Status"),"liste.php","e.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),"ship2bill.php","e.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
print "</tr>\n";
// Lignes des champs de filtre
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_ref_exp" value="'.$search_ref_exp.'">';
print '</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="10" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
if($conf->livraison_bon->enabled) {
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_ref_liv" value="'.$search_ref_liv.'"';
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
}
print '<td class="liste_titre" align="right">';
// Développé dans la 3.7
//print img_search();
//print img_searchclear();
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '</td>';
print '<td class="liste_titre" align="center">';
print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
print '</td>';
print "</tr>\n";
$var=True;
while ($i < min($num,$limit))

View File

@@ -122,6 +122,7 @@ CustomerInvoicePayment=Payment of invoice customer
ThirdPartyAccount=Thirdparty account
NewAccountingMvt=New movement
NumMvts=Number of movement
ListeMvts=List of the movement
ErrorDebitCredit=Debit and Credit cannot have a value at the same time

View File

@@ -30,3 +30,4 @@ SearchADonation=Search a donation
DonationRecipient=Donation recipient
ThankYou=Thank You
IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount
MinimumAmount=Minimum amount is %s

View File

@@ -120,6 +120,7 @@ CustomerInvoicePayment=Pago Factura a cliente
ThirdPartyAccount=Cuenta tercero
NewAccountingMvt=Nueva movimiento
NumMvts=Número de movimiento
ListeMvts=Apuntes del movimiento
ErrorDebitCredit=Débito y Crédito no pueden terner valor al mismo tiempo

View File

@@ -122,6 +122,7 @@ CustomerInvoicePayment=Règlement de facture client
ThirdPartyAccount=Compte tiers
NewAccountingMvt=Nouveau mouvement
NumMvts=Numéro de mouvement
ListeMvts=Liste du mouvement
ErrorDebitCredit=Debit et Credit ne peuvent avoir une valeur en même temps

View File

@@ -37,4 +37,5 @@ IConfirmDonationReception=Le bénéficiaire reconnait avoir reçu au titre des d
FrenchOptions=Options éligibles en France
DONATION_ART200=Les dons ou versements reçus sont éligibles à l'article 200 du CGI
DONATION_ART238=Les dons ou versements reçus sont éligibles à l'article 238bis du CGI
DONATION_ART885=Les dons ou versements reçus sont éligibles à l'article 885-0 V bis A du CGI
DONATION_ART885=Les dons ou versements reçus sont éligibles à l'article 885-0 V bis A du CGI
MinimumAmount=Le montant minimum du don est de %s