Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
Darkjeff committed Jan 17, 2018
2 parents 5f1a95e + 56d702e commit e8b27c8
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 178 deletions.
4 changes: 2 additions & 2 deletions build/doxygen/dolibarr-doxygen.doxyfile
Expand Up @@ -442,7 +442,7 @@ SORT_BY_SCOPE_NAME = NO
# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.

GENERATE_TODOLIST = YES
GENERATE_TODOLIST = NO

# The GENERATE_TESTLIST tag can be used to enable (YES) or
# disable (NO) the test list. This list is created by putting \test
Expand Down Expand Up @@ -639,7 +639,7 @@ EXCLUDE_SYMBOLS =
# directories that contain example code fragments that are included (see
# the \include command).

EXAMPLE_PATH = ../../dev/skeletons
EXAMPLE_PATH = ../../htdocs/modulebuilder/template

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
Expand Down
27 changes: 18 additions & 9 deletions htdocs/compta/facture/list.php
Expand Up @@ -359,9 +359,10 @@
$sql.= ' f.datef as df, f.date_lim_reglement as datelimite,';
$sql.= ' f.paye as paye, f.fk_statut,';
$sql.= ' f.datec as date_creation, f.tms as date_update,';
$sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
$sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,';
$sql.= " typent.code as typent_code,";
$sql.= " state.code_departement as state_code, state.nom as state_name";
$sql.= " state.code_departement as state_code, state.nom as state_name,";
$sql.= " country.code as country_code";
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
Expand Down Expand Up @@ -484,8 +485,10 @@
$sql.= ' f.datef, f.date_lim_reglement,';
$sql.= ' f.paye, f.fk_statut,';
$sql.= ' f.datec, f.tms,';
$sql.= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.code_client, s.client, typent.code,';
$sql.= ' state.code_departement, state.nom';
$sql.= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,';
$sql.= ' typent.code,';
$sql.= ' state.code_departement, state.nom,';
$sql.= ' country.code';

foreach ($extrafields->attribute_label as $key => $val) //prevent error with sql_mode=only_full_group_by
{
Expand Down Expand Up @@ -878,6 +881,17 @@
$facturestatic->note_public=$obj->note_public;
$facturestatic->note_private=$obj->note_private;

$thirdpartystatic->id=$obj->socid;
$thirdpartystatic->name=$obj->name;
$thirdpartystatic->client=$obj->client;
$thirdpartystatic->fournisseur=$obj->fournisseur;
$thirdpartystatic->code_client=$obj->code_client;
$thirdpartystatic->code_compta_client=$obj->code_compta_client;
$thirdpartystatic->code_fournisseur=$obj->code_fournisseur;
$thirdpartystatic->code_compta_fournisseur=$obj->code_compta_fournisseur;
$thirdpartystatic->email=$obj->email;
$thirdpartystatic->country_code=$obj->country_code;

$paiement = $facturestatic->getSommePaiement();
$totalcreditnotes = $facturestatic->getSumCreditNotesUsed();
$totaldeposits = $facturestatic->getSumDepositsUsed();
Expand Down Expand Up @@ -966,11 +980,6 @@
if (! empty($arrayfields['s.nom']['checked']))
{
print '<td class="tdoverflowmax200">';
$thirdpartystatic->id=$obj->socid;
$thirdpartystatic->name=$obj->name;
$thirdpartystatic->client=$obj->client;
$thirdpartystatic->code_client=$obj->code_client;
$thirdpartystatic->email=$obj->email;
print $thirdpartystatic->getNomUrl(1,'customer');
print '</td>';
if (! $i) $totalarray['nbfield']++;
Expand Down
133 changes: 0 additions & 133 deletions htdocs/core/class/dolprintipp.class.php

This file was deleted.

10 changes: 5 additions & 5 deletions htdocs/core/doxygen.php
Expand Up @@ -27,10 +27,10 @@
* <br>
* Dolibarr official web site: <a href="https://www.dolibarr.org">www.dolibarr.org</a><br>
* <br>
* Dolibarr french portal: <a href="http://www.dolibarr.fr">www.dolibarr.fr</a><br>
* Dolibarr spanish portal: <a href="http://www.dolibarr.es">www.dolibarr.es</a><br>
* Dolibarr italian portal: <a href="http://www.dolibarr.it">www.dolibarr.it</a><br>
* Dolibarr greek portal: <a href="http://www.dolibarr.gr">www.dolibarr.gr</a><br>
* Dolibarr german portal: <a href="http://www.dolibarr.de">www.dolibarr.de</a><br>
* Dolibarr french portal: <a href="https://www.dolibarr.fr">www.dolibarr.fr</a><br>
* Dolibarr spanish portal: <a href="https://www.dolibarr.es">www.dolibarr.es</a><br>
* Dolibarr italian portal: <a href="https://www.dolibarr.it">www.dolibarr.it</a><br>
* Dolibarr greek portal: <a href="https://www.dolibarr.gr">www.dolibarr.gr</a><br>
* Dolibarr german portal: <a href="https://www.dolibarr.de">www.dolibarr.de</a><br>
* <br>
*/
2 changes: 1 addition & 1 deletion htdocs/core/lib/functions2.lib.php
Expand Up @@ -1987,7 +1987,7 @@ function getElementProperties($element_type)
$module = $regs[2];
}

//print '<br />1. element : '.$element.' - module : '.$module .'<br />';
//print '<br>1. element : '.$element.' - module : '.$module .'<br>';
if ( preg_match('/^([^_]+)_([^_]+)/i',$element,$regs))
{
$module = $element = $regs[1];
Expand Down
2 changes: 1 addition & 1 deletion htdocs/cron/list.php
Expand Up @@ -127,7 +127,7 @@
$res = $object->reprogram_jobs($user->login, $now);
if ($res > 0)
{
if ($resrunjob >= 0) // We add result of reprogram ony if no error message already reported
if ($resrunjob >= 0) // We show the result of reprogram only if no error message already reported
{
if ($object->lastresult >= 0) setEventMessages($langs->trans("JobFinished"), null, 'mesgs');
else setEventMessages($langs->trans("JobFinished"), null, 'errors');
Expand Down
25 changes: 17 additions & 8 deletions htdocs/fourn/facture/list.php
Expand Up @@ -255,6 +255,7 @@
$bankaccountstatic=new Account($db);
$facturestatic=new FactureFournisseur($db);
$formcompany=new FormCompany($db);
$thirdparty=new Societe($db);

llxHeader('',$langs->trans("SuppliersInvoices"),'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores');

Expand All @@ -263,9 +264,10 @@
$sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.date_lim_reglement as datelimite, f.fk_mode_reglement,";
$sql.= " f.total_ht, f.total_ttc, f.total_tva as total_vat, f.paye as paye, f.fk_statut as fk_statut, f.libelle as label, f.datec as date_creation, f.tms as date_update,";
$sql.= " f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,";
$sql.= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,";
$sql.= " s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,";
$sql.= " typent.code as typent_code,";
$sql.= " state.code_departement as state_code, state.nom as state_name,";
$sql.= " country.code as country_code,";
$sql.= " p.rowid as project_id, p.ref as project_ref";
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
Expand Down Expand Up @@ -378,9 +380,10 @@
$sql.= " GROUP BY f.rowid, f.ref, f.ref_supplier, f.datef, f.date_lim_reglement, f.fk_mode_reglement,";
$sql.= " f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut, f.libelle, f.datec, f.tms,";
$sql.= " f.localtax1, f.localtax2,";
$sql.= " s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.client, s.code_client,";
$sql.= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,';
$sql.= " typent.code,";
$sql.= " state.code_departement, state.nom,";
$sql.= ' country.code,';
$sql.= " p.rowid, p.ref";

foreach ($extrafields->attribute_label as $key => $val) //prevent error with sql_mode=only_full_group_by
Expand Down Expand Up @@ -790,6 +793,17 @@
$facturestatic->date_echeance = $db->jdate($obj->datelimite);
$facturestatic->statut = $obj->fk_statut;

$thirdparty->id=$obj->socid;
$thirdparty->name=$obj->name;
$thirdparty->client=$obj->client;
$thirdparty->fournisseur=$obj->fournisseur;
$thirdparty->code_client=$obj->code_client;
$thirdparty->code_compta_client=$obj->code_compta_client;
$thirdparty->code_fournisseur=$obj->code_fournisseur;
$thirdparty->code_compta_fournisseur=$obj->code_compta_fournisseur;
$thirdparty->email=$obj->email;
$thirdparty->country_code=$obj->country_code;

$paiement = $facturestatic->getSommePaiement();
$totalcreditnotes = $facturestatic->getSumCreditNotesUsed();
$totaldeposits = $facturestatic->getSumDepositsUsed();
Expand Down Expand Up @@ -821,7 +835,7 @@
if (! $i) $totalarray['nbfield']++;
}

// Customer ref
// Supplier ref
if (! empty($arrayfields['f.ref_supplier']['checked']))
{
print '<td class="nowrap">';
Expand Down Expand Up @@ -878,11 +892,6 @@
if (! empty($arrayfields['s.nom']['checked']))
{
print '<td class="tdoverflowmax200">';
$thirdparty=new Societe($db);
$thirdparty->id=$obj->socid;
$thirdparty->name=$obj->name;
$thirdparty->client=$obj->client;
$thirdparty->code_client=$obj->code_client;
print $thirdparty->getNomUrl(1,'supplier');
print '</td>';
if (! $i) $totalarray['nbfield']++;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/index.php
Expand Up @@ -618,15 +618,15 @@

$boxlist.='<div class="fichehalfleft boxhalfleft" id="boxhalfleft">';

$boxlist.=$boxstat;
$boxlist.=$boxwork;
$boxlist.=$resultboxes['boxlista'];

$boxlist.= '</div>';

$boxlist.= '<div class="fichehalfright boxhalfright" id="boxhalfright">';
$boxlist.= '<div class="ficheaddleft">';

$boxlist.=$boxwork;
$boxlist.=$boxstat;
$boxlist.=$resultboxes['boxlistb'];

$boxlist.= '</div>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/install/mysql/data/llx_c_email_templates.sql
Expand Up @@ -20,7 +20,7 @@
-- de l'install et tous les sigles '--' sont supprimés.
--

INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'adherent','member','',0,null,null,'(SendAnEMailToMember)',1,1,1,'__(CardContent)__','__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civiliyty)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br />\n__(Lastname)__ : __MEMBER_LASTNAME__<br />\n__(Fullname)__ : __MEMBER_FULLNAME__<br />\n__(Company)__ : __MEMBER_COMPANY__<br />\n__(Address)__ : __MEMBER_ADDRESS__<br />\n__(Zip)__ : __MEMBER_ZIP__<br />\n__(Town)__ : __MEMBER_TOWN__<br />\n__(Country)__ : __MEMBER_COUNTRY__<br />\n__(Email)__ : __MEMBER_EMAIL__<br />\n__(Birthday)__ : __MEMBER_BIRTH__<br />\n__(Photo)__ : __MEMBER_PHOTO__<br />\n__(Login)__ : __MEMBER_LOGIN__<br />\n__(Password)__ : __MEMBER_PASSWORD__<br />\n__(Phone)__ : __MEMBER_PHONE__<br />\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br />\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null);
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'adherent','member','',0,null,null,'(SendAnEMailToMember)',1,1,1,'__(CardContent)__','__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civiliyty)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Password)__ : __MEMBER_PASSWORD__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null);
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,1,0,'__(YourSEPAMandate)__','__(Hello)__,<br><br>\n\n__(FindYourSEPAMandate)__ :<br>\n__MYCOMPANY_NAME__<br>\n__MYCOMPANY_FULLADDRESS__<br><br>\n__(Sincerely)__<br>\n__USER_SIGNATURE__',null);


2 changes: 1 addition & 1 deletion htdocs/install/mysql/migration/6.0.0-7.0.0.sql
Expand Up @@ -183,7 +183,7 @@ ALTER TABLE llx_c_email_templates ADD COLUMN enabled varchar(255) DEFAULT '1';
ALTER TABLE llx_c_email_templates ADD COLUMN joinfiles varchar(255) DEFAULT '1';
ALTER TABLE llx_c_email_templates MODIFY COLUMN content mediumtext;

INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'adherent','member','',0,null,null,'(SendAnEMailToMember)',1,1,1,'__(CardContent)__','__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civiliyty)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br />\n__(Lastname)__ : __MEMBER_LASTNAME__<br />\n__(Fullname)__ : __MEMBER_FULLNAME__<br />\n__(Company)__ : __MEMBER_COMPANY__<br />\n__(Address)__ : __MEMBER_ADDRESS__<br />\n__(Zip)__ : __MEMBER_ZIP__<br />\n__(Town)__ : __MEMBER_TOWN__<br />\n__(Country)__ : __MEMBER_COUNTRY__<br />\n__(Email)__ : __MEMBER_EMAIL__<br />\n__(Birthday)__ : __MEMBER_BIRTH__<br />\n__(Photo)__ : __MEMBER_PHOTO__<br />\n__(Login)__ : __MEMBER_LOGIN__<br />\n__(Password)__ : __MEMBER_PASSWORD__<br />\n__(Phone)__ : __MEMBER_PHONE__<br />\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br />\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null);
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'adherent','member','',0,null,null,'(SendAnEMailToMember)',1,1,1,'__(CardContent)__','__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civiliyty)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Password)__ : __MEMBER_PASSWORD__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null);
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,1,0,'__(YourSEPAMandate)__','__(Hello)__,<br><br>\n\n__(FindYourSEPAMandate)__ :<br>\n__MYCOMPANY_NAME__<br>\n__MYCOMPANY_FULLADDRESS__<br><br>\n__(Sincerely)__<br>\n__USER_SIGNATURE__',null);

INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 1, 'VENTES', 'Income of products/services', 'Exemple: 7xxxxx', 0, 0, '', '10', 1, 1);
Expand Down

0 comments on commit e8b27c8

Please sign in to comment.