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

This commit is contained in:
Laurent Destailleur 2013-06-03 19:26:01 +02:00
commit b4c5114ee6
33 changed files with 253 additions and 189 deletions

View File

@ -88,10 +88,12 @@ WARNING: If you used external modules, some of them may need to be upgraded due
- If module use hook pdf_writelinedesc, module may have to add return 1 at end of
function to keep same behaviour.
***** ChangeLog for 3.3.3 compared to 3.3.2 *****
- Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php
***** ChangeLog for 3.3.2 compared to 3.3.1 *****
- Fix: Dutch (nl_NL) translation
- Generalize fix: file with a specific mask not found, again
- Fix: translations and BILL_SUPPLIER_BUILDDOC trigger
@ -120,8 +122,8 @@ WARNING: If you used external modules, some of them may need to be upgraded due
- Fix: [ bug #788 ] Date of linked interventions are not shown
- Fix: external users should not see costprice and margin infos
- Fix: [ bug #806 ] Tasks are ordered alphabetically instead of chronological order
***** ChangeLog for 3.3.1 compared to 3.3 *****
***** ChangeLog for 3.3.1 compared to 3.3 *****
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag
- Fix: Package for launchpad
- Fix: [ bug #736 ] Missing column in llx_c_chargesociales
@ -129,8 +131,6 @@ WARNING: If you used external modules, some of them may need to be upgraded due
- Fix: [ bug #762 ] Bad profit calculation in Reporting
- Fix: bug dictionnary with wrong prefix table
***** ChangeLog for 3.3 compared to 3.2.3 *****
For users:
- New: Add holiday module, to declare and follow holidays of your employees.

View File

@ -44,6 +44,7 @@ $year = strftime("%Y", time());
$startyear=$year-2;
$endyear=$year;
$langs->load("members");
/*

View File

@ -44,14 +44,16 @@ $year = strftime("%Y", time());
$startyear=$year-2;
$endyear=$year;
$langs->load("members");
/*
* View
*/
llxHeader('','','','',0,0,array('http://www.google.com/jsapi'));
$arrayjs=array('http://www.google.com/jsapi');
if (! empty($conf->dol_use_jmobile)) $arrayjs=array();
llxHeader('','','','',0,0,$arrayjs);
$title=$langs->trans("Statistics");
if ($mode == 'memberbycountry') $title=$langs->trans("MembersStatisticsByCountries");
@ -195,7 +197,7 @@ else
// Show graphics
if ($mode == 'memberbycountry')
if (count($arrayjs) && $mode == 'memberbycountry')
{
$color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php';
if (is_readable($color_file)) include_once $color_file;

View File

@ -46,6 +46,8 @@ $year = strftime("%Y", time());
$startyear=$year-2;
$endyear=$year;
$langs->load("members");
/*
* View
@ -53,8 +55,6 @@ $endyear=$year;
$form=new Form($db);
$langs->load("propal");
llxHeader();
print_fiche_titre($langs->trans("SubscriptionsStatistics"), $mesg);

View File

@ -55,7 +55,7 @@ $specimenthirdparty->initAsSpecimen();
if ($action == 'updateMask')
{
$maskconstorder=GETPOST('maskconstorder','alpha');
$maskvalue=GETPOST('maskvalue','alpha');
$maskvalue=GETPOST('maskorder','alpha');
if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskvalue,'chaine',0,'',$conf->entity);

View File

@ -888,7 +888,7 @@ if ($id > 0)
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
print '</form>'."\n";
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -897,7 +897,7 @@ if ($id > 0)
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
print '</form>'."\n";
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -906,7 +906,7 @@ if ($id > 0)
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
print '</form>'."\n";
print '</td>';
print '</tr>';

View File

@ -28,6 +28,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';

View File

@ -87,17 +87,17 @@ class InfoBox
{
if (preg_match('/^([^@]+)@([^@]+)$/i',$obj->file,$regs))
{
$boxname = $regs[1];
$boxname = preg_replace('/\.php$/i','',$regs[1]);
$module = $regs[2];
$relsourcefile = "/".$module."/core/boxes/".$boxname.".php";
}
else
{
$boxname=preg_replace('/.php$/i','',$obj->file);
$boxname=preg_replace('/\.php$/i','',$obj->file);
$relsourcefile = "/core/boxes/".$boxname.".php";
}
}
// TODO PERF Do not make "dol_include_once" here, nor "new" later. This means, we must store a 'depends' field to store modules list, then
// TODO PERF Do not make "dol_include_once" here, nor "new" later. This means, we must store a 'depends' field to store modules list, then
// the "enabled" condition for modules forbidden for external users and the depends condition can be done.
// Goal is to avoid making a new instance for each boxes returned by select.
@ -106,7 +106,7 @@ class InfoBox
{
$box=new $boxname($db,$obj->note); // Constructor may set properties like box->enabled. obj->note is note into box def, not user params.
//$box=new stdClass();
// box properties
$box->rowid = (empty($obj->rowid) ? '' : $obj->rowid);
$box->id = (empty($obj->box_id) ? '' : $obj->box_id);
@ -126,7 +126,7 @@ class InfoBox
// box_def properties
$box->box_id = (empty($obj->box_id) ? '' : $obj->box_id);
$box->note = (empty($obj->note) ? '' : $obj->note);
// Filter on box->enabled (fused for example by box_comptes) and box->depends
//$enabled=1;
$enabled=$box->enabled;
@ -135,14 +135,15 @@ class InfoBox
foreach($box->depends as $module)
{
//print $boxname.'-'.$module.'<br>';
if (empty($conf->$module->enabled)) $enabled=0;
$tmpmodule=preg_replace('/@[^@]+/','',$module);
if (empty($conf->$tmpmodule->enabled)) $enabled=0;
}
}
//print 'xx module='.$module.' enabled='.$enabled;
if ($enabled) $boxes[]=$box;
else unset($box);
}
}
}
$j++;
}

View File

@ -48,11 +48,10 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
$title=$langs->trans("Menu");
// URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests
$head='<!-- Menu -->'."\n";
$arrayofjs=array();
$arrayofcss=array();
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
print '<body>'."\n";

View File

@ -115,13 +115,13 @@ function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirt
// Buttons
print '<td align="center" valign="middle" class="nowrap">';
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" class="button" style="width:120px" name="viewcal" value="'.$langs->trans("ViewCal").'">';
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewcal" value="'.$langs->trans("ViewCal").'">';
print '<br>';
print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" class="button" style="width:120px" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
print '<br>';
print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" class="button" style="width:120px" name="viewday" value="'.$langs->trans("ViewDay").'">';
print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewday" value="'.$langs->trans("ViewDay").'">';
print '<br>';
print img_picto($langs->trans("ViewList"),'object_list','class="hideonsmartphone"').' <input type="submit" class="button" style="width:120px" name="viewlist" value="'.$langs->trans("ViewList").'">';
print img_picto($langs->trans("ViewList"),'object_list','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewlist" value="'.$langs->trans("ViewList").'">';
print '</td>';
// Legend

View File

@ -2793,7 +2793,7 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
if (empty($thirdparty_seller) || ! is_object($thirdparty_seller)) $thirdparty_seller=$mysoc;
dol_syslog("get_localtax tva=".$tva." local=".$local." thirdparty_buyer id=".(is_object($thirdparty_buyer)?$thirdparty_buyer->id:'')." thirdparty_seller id=".$thirdparty_seller->id);
dol_syslog("get_localtax tva=".$tva." local=".$local." thirdparty_buyer id=".(is_object($thirdparty_buyer)?$thirdparty_buyer->id:'')."/country_code=".(is_object($thirdparty_buyer)?$thirdparty_buyer->country_code:'')." thirdparty_seller id=".$thirdparty_seller->id."/country_code=".$thirdparty_seller->country_code." thirdparty_seller localtax1_assuj=".$thirdparty_seller->localtax1_assuj." thirdparty_seller localtax2_assuj=".$thirdparty_seller->localtax2_assuj);
// Some test to guess with no need to make database access
if ($mysoc->country_code == 'ES') // For spain localtaxes 1 and 2, tax is qualified if buyer use local taxe
@ -2819,16 +2819,18 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
}
//if ($local == 0 && ! $thirdparty_seller->localtax1_assuj && ! $thirdparty_seller->localtax2_assuj) return array('localtax1'=>0,'localtax2'=>0);
$code_country=$thirdparty_seller->country_code;
// Do not enabled this. We want localtax that match the vat rate.
// If we forced a vat, we must also force local tax
/*
if (is_object($thirdparty_buyer))
{
if ($code_country != $thirdparty_buyer->country_code) return 0;
}
if ($thirdparty_seller->country_code != $thirdparty_buyer->country_code) return 0;
}*/
// Search local taxes
$sql = "SELECT t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type";
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
$sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$code_country."'";
$sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty_seller->country_code."'";
$sql .= " AND t.taux = ".$tva." AND t.active = 1";
dol_syslog("get_localtax sql=".$sql);

View File

@ -79,7 +79,9 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
$seller=$mysoc; // If sell is done to a customer, $seller is not provided, we use $mysoc
//var_dump($seller->country_id);exit;
}
// Too verbose. Enable for debug only
//dol_syslog("calcul_price_total qty=".$qty." pu=".$pu." remiserpercent_ligne=".$remise_percent_ligne." txtva=".$txtva." uselocaltax1_rate=".$uselocaltax1_rate." uselocaltax2_rate=".$uselocaltax2_rate);
$countryid=$seller->country_id;
if ($uselocaltax1_rate < 0) $uselocaltax1_rate=$seller->localtax1_assuj;
if ($uselocaltax2_rate < 0) $uselocaltax2_rate=$seller->localtax2_assuj;
@ -91,7 +93,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as cv";
$sql.= " WHERE cv.taux = ".$txtva;
$sql.= " AND cv.fk_pays = ".$countryid;
dol_syslog("search vat information sql=".$sql);
dol_syslog("calcul_price_total search vat information sql=".$sql);
$resql = $db->query($sql);
if ($resql)
{

View File

@ -606,9 +606,11 @@ abstract class DolibarrModules
foreach ($this->boxes as $key => $value)
{
//$titre = $this->boxes[$key][0];
$file = $this->boxes[$key][1];
$file = $this->boxes[$key]['file'];
//$note = $this->boxes[$key][2];
if (empty($file)) $file = isset($this->boxes[$key][1])?$this->boxes[$key][1]:''; // For backward compatibility
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes";
$sql.= " USING ".MAIN_DB_PREFIX."boxes, ".MAIN_DB_PREFIX."boxes_def";
$sql.= " WHERE ".MAIN_DB_PREFIX."boxes.box_id = ".MAIN_DB_PREFIX."boxes_def.rowid";

View File

@ -4,6 +4,7 @@
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
*
* 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
@ -41,6 +42,8 @@ class modAdherent extends DolibarrModules
*/
function __construct($db)
{
global $conf;
$this->db = $db;
$this->numero = 310;
@ -176,7 +179,7 @@ class modAdherent extends DolibarrModules
$this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'a.country'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.birth'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
$this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'a.country'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.birth'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
// Add extra fields
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'";
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
while ($obj=$this->db->fetch_object($resql))
{
@ -209,7 +212,7 @@ class modAdherent extends DolibarrModules
$this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id
$this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.lastname'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.country'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'";
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{

View File

@ -105,9 +105,9 @@ class modExternalRss extends DolibarrModules
if (preg_match('/EXTERNAL_RSS_TITLE_([0-9]+)/i',$obj->name,$reg))
{
// Definie la boite si on a trouvee une ancienne configuration
$this->boxes[$reg[1]][0] = "(ExternalRSSInformations)";
$this->boxes[$reg[1]][1] = "box_external_rss.php";
$this->boxes[$reg[1]][2] = $reg[1]." (".$obj->value.")";
//$this->boxes[$reg[1]][0] = "(ExternalRSSInformations)";
$this->boxes[$reg[1]]['file'] = "box_external_rss.php";
$this->boxes[$reg[1]]['note'] = $reg[1]." (".$obj->value.")";
}
}
$this->db->free($result);
@ -131,7 +131,7 @@ class modExternalRss extends DolibarrModules
$sql = array();
// Delete old declarations of RSS box
$this->boxes[0][1] = "box_external_rss.php";
$this->boxes[0]['file'] = "box_external_rss.php";
return $this->_remove($sql,$options);
}

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
*
* 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
@ -254,7 +254,7 @@ class modSociete extends DolibarrModules
$this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Number",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.code_compta'=>"Text",'s.code_compta_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'Text');
$this->export_entities_array[$r]=array(); // We define here only fields that use another picto
// Add extra fields
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'";
$sql="SELECT name, label, type FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'";
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
@ -345,7 +345,7 @@ class modSociete extends DolibarrModules
$this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation");
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'";
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
@ -380,7 +380,7 @@ class modSociete extends DolibarrModules
$this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople','extra'=>MAIN_DB_PREFIX.'socpeople_extrafields'); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.lastname'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation");
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'contact'";
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'contact' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{

View File

@ -45,12 +45,18 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
* View
*/
$title=$langs->trans("Search");
// URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
$head='<!-- Quick access -->'."\n";
$arrayofjs=array();
$arrayofcss=array();
top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
print '<body style="margin: 30px; height: 100%;">'."\n";
print '<body>'."\n";
print '<div>';
//print '<br>';
$nbofsearch=0;
@ -112,6 +118,7 @@ print '</div>'."\n";
print '</div>';
print "<!-- End SearchForm -->\n";
print '</div>';
print '</body></html>'."\n";
$db->close();

View File

@ -135,6 +135,8 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 3,'973','97302',3,'GUYANE','Guyane');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 4,'974','97411',3,'REUNION','Réunion');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 6,'976','97601',3,'MAYOTTE','Mayotte');
-- Provinces Belgium (id country=2)
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'01','',1,'ANVERS','Anvers');

View File

@ -66,6 +66,8 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2
-- CANADA (id country=14)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (141, 14, '7','0','VAT standard rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (142, 14, '0','0','VAT Rate 0',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','TPS and TVQ rate',1);
-- CAMEROUN (id country=24)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (241, 24, '19.25','0','VAT standard rate',1);

View File

@ -382,3 +382,6 @@ ALTER TABLE llx_user_clicktodial ADD COLUMN url varchar(255) AFTER fk_user;
ALTER TABLE llx_fichinterdet ADD COLUMN fk_parent_line integer NULL AFTER fk_fichinter;
ALTER TABLE llx_societe_address CHANGE COLUMN tel phone varchar(20);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','TPS and TVQ rate',1);

View File

@ -24,7 +24,7 @@ CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP(TIMESTAMP WITHOUT TIME ZONE) RETURNS B
CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP(TIMESTAMP WITH TIME ZONE) RETURNS BIGINT LANGUAGE SQL IMMUTABLE STRICT AS 'SELECT EXTRACT(EPOCH FROM $1)::bigint;';
CREATE OR REPLACE FUNCTION date_format(timestamp without time zone, text) RETURNS text AS $$ DECLARE i int := 1; temp text := ''; c text; n text; res text; BEGIN WHILE i <= pg_catalog.length($2) LOOP c := SUBSTRING ($2 FROM i FOR 1); IF c = '%' AND i != pg_catalog.length($2) THEN n := SUBSTRING ($2 FROM (i + 1) FOR 1); SELECT INTO res CASE WHEN n = 'a' THEN pg_catalog.to_char($1, 'Dy') WHEN n = 'b' THEN pg_catalog.to_char($1, 'Mon') WHEN n = 'c' THEN pg_catalog.to_char($1, 'FMMM') WHEN n = 'D' THEN pg_catalog.to_char($1, 'FMDDth') WHEN n = 'd' THEN pg_catalog.to_char($1, 'DD') WHEN n = 'e' THEN pg_catalog.to_char($1, 'FMDD') WHEN n = 'f' THEN pg_catalog.to_char($1, 'US') WHEN n = 'H' THEN pg_catalog.to_char($1, 'HH24') WHEN n = 'h' THEN pg_catalog.to_char($1, 'HH12') WHEN n = 'I' THEN pg_catalog.to_char($1, 'HH12') WHEN n = 'i' THEN pg_catalog.to_char($1, 'MI') WHEN n = 'j' THEN pg_catalog.to_char($1, 'DDD') WHEN n = 'k' THEN pg_catalog.to_char($1, 'FMHH24') WHEN n = 'l' THEN pg_catalog.to_char($1, 'FMHH12') WHEN n = 'M' THEN pg_catalog.to_char($1, 'FMMonth') WHEN n = 'm' THEN pg_catalog.to_char($1, 'MM') WHEN n = 'p' THEN pg_catalog.to_char($1, 'AM') WHEN n = 'r' THEN pg_catalog.to_char($1, 'HH12:MI:SS AM') WHEN n = 'S' THEN pg_catalog.to_char($1, 'SS') WHEN n = 's' THEN pg_catalog.to_char($1, 'SS') WHEN n = 'T' THEN pg_catalog.to_char($1, 'HH24:MI:SS') WHEN n = 'U' THEN pg_catalog.to_char($1, '?') WHEN n = 'u' THEN pg_catalog.to_char($1, '?') WHEN n = 'V' THEN pg_catalog.to_char($1, '?') WHEN n = 'v' THEN pg_catalog.to_char($1, '?') WHEN n = 'W' THEN pg_catalog.to_char($1, 'FMDay') WHEN n = 'w' THEN EXTRACT(DOW FROM $1)::text WHEN n = 'X' THEN pg_catalog.to_char($1, '?') WHEN n = 'x' THEN pg_catalog.to_char($1, '?') WHEN n = 'Y' THEN pg_catalog.to_char($1, 'YYYY') WHEN n = 'y' THEN pg_catalog.to_char($1, 'YY') WHEN n = '%' THEN pg_catalog.to_char($1, '%') ELSE NULL END; temp := temp operator(pg_catalog.||) res; i := i + 2; ELSE temp = temp operator(pg_catalog.||) c; i := i + 1; END IF; END LOOP; RETURN temp; END $$ IMMUTABLE STRICT LANGUAGE 'PLPGSQL';
CREATE OR REPLACE FUNCTION date_format(timestamp without time zone, text) RETURNS text AS $$ DECLARE i int := 1; temp text := ''; c text; n text; res text; BEGIN WHILE i <= pg_catalog.length($2) LOOP c := SUBSTRING ($2 FROM i FOR 1); IF c = '%' AND i != pg_catalog.length($2) THEN n := SUBSTRING ($2 FROM (i + 1) FOR 1); SELECT INTO res CASE WHEN n = 'a' THEN pg_catalog.to_char($1, 'Dy') WHEN n = 'b' THEN pg_catalog.to_char($1, 'Mon') WHEN n = 'c' THEN pg_catalog.to_char($1, 'FMMM') WHEN n = 'D' THEN pg_catalog.to_char($1, 'FMDDth') WHEN n = 'd' THEN pg_catalog.to_char($1, 'DD') WHEN n = 'e' THEN pg_catalog.to_char($1, 'FMDD') WHEN n = 'f' THEN pg_catalog.to_char($1, 'US') WHEN n = 'H' THEN pg_catalog.to_char($1, 'HH24') WHEN n = 'h' THEN pg_catalog.to_char($1, 'HH12') WHEN n = 'I' THEN pg_catalog.to_char($1, 'HH12') WHEN n = 'i' THEN pg_catalog.to_char($1, 'MI') WHEN n = 'j' THEN pg_catalog.to_char($1, 'DDD') WHEN n = 'k' THEN pg_catalog.to_char($1, 'FMHH24') WHEN n = 'l' THEN pg_catalog.to_char($1, 'FMHH12') WHEN n = 'M' THEN pg_catalog.to_char($1, 'FMMonth') WHEN n = 'm' THEN pg_catalog.to_char($1, 'MM') WHEN n = 'p' THEN pg_catalog.to_char($1, 'AM') WHEN n = 'r' THEN pg_catalog.to_char($1, 'HH12:MI:SS AM') WHEN n = 'S' THEN pg_catalog.to_char($1, 'SS') WHEN n = 's' THEN pg_catalog.to_char($1, 'SS') WHEN n = 'T' THEN pg_catalog.to_char($1, 'HH24:MI:SS') WHEN n = 'U' THEN pg_catalog.to_char($1, '?') WHEN n = 'u' THEN pg_catalog.to_char($1, '?') WHEN n = 'V' THEN pg_catalog.to_char($1, '?') WHEN n = 'v' THEN pg_catalog.to_char($1, '?') WHEN n = 'W' THEN pg_catalog.to_char($1, 'FMDay') WHEN n = 'w' THEN EXTRACT(DOW FROM $1)::text WHEN n = 'X' THEN pg_catalog.to_char($1, '?') WHEN n = 'x' THEN pg_catalog.to_char($1, '?') WHEN n = 'Y' THEN pg_catalog.to_char($1, 'YYYY') WHEN n = 'y' THEN pg_catalog.to_char($1, 'YY') WHEN n = '%' THEN pg_catalog.to_char($1, '%') ELSE NULL END; temp := temp operator(pg_catalog.||) res; i := i + 2; ELSE temp = temp operator(pg_catalog.||) c; i := i + 1; END IF; END LOOP; RETURN temp; END $$ IMMUTABLE STRICT LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION YEAR(TIMESTAMP without TIME ZONE) RETURNS INTEGER AS $$ SELECT EXTRACT(YEAR FROM $1)::INTEGER; $$ LANGUAGE SQL IMMUTABLE;
@ -47,13 +47,13 @@ CREATE OR REPLACE FUNCTION DAY(TIMESTAMP WITH TIME ZONE) RETURNS INTEGER AS $$ S
CREATE OR REPLACE FUNCTION DAY(DATE) RETURNS INTEGER AS $$ SELECT EXTRACT(DAY FROM $1)::INTEGER; $$ LANGUAGE SQL IMMUTABLE;
CREATE OR REPLACE FUNCTION dol_util_rebuild_sequences() RETURNS integer as $body$ DECLARE sequencedefs RECORD; c integer ; BEGIN FOR sequencedefs IN SELECT DISTINCT constraint_column_usage.table_name as tablename, constraint_column_usage.table_name as tablename, constraint_column_usage.column_name as columnname, replace(replace(columns.column_default,'''::regclass)',''),'nextval(''','') as sequencename from information_schema.constraint_column_usage, information_schema.columns, information_schema.sequences where constraint_column_usage.table_schema ='public' AND columns.table_schema = 'public' AND columns.table_name=constraint_column_usage.table_name AND constraint_column_usage.column_name IN ('rowid','id') AND constraint_column_usage.column_name = columns.column_name AND columns.column_default is not null AND replace(replace(columns.column_default,'''::regclass)',''),'nextval(''','')=sequence_name LOOP EXECUTE 'select max('||sequencedefs.columnname||') from ' || sequencedefs.tablename INTO c; IF c is null THEN c = 0; END IF; IF c is not null THEN c = c+ 1; END IF; EXECUTE 'alter sequence ' || sequencedefs.sequencename ||' restart with ' || c; END LOOP; RETURN 1; END; $body$ LANGUAGE 'PLPGSQL';
CREATE OR REPLACE FUNCTION dol_util_rebuild_sequences() RETURNS integer as $body$ DECLARE sequencedefs RECORD; c integer ; BEGIN FOR sequencedefs IN SELECT DISTINCT constraint_column_usage.table_name as tablename, constraint_column_usage.table_name as tablename, constraint_column_usage.column_name as columnname, replace(replace(columns.column_default,'''::regclass)',''),'nextval(''','') as sequencename from information_schema.constraint_column_usage, information_schema.columns, information_schema.sequences where constraint_column_usage.table_schema ='public' AND columns.table_schema = 'public' AND columns.table_name=constraint_column_usage.table_name AND constraint_column_usage.column_name IN ('rowid','id') AND constraint_column_usage.column_name = columns.column_name AND columns.column_default is not null AND replace(replace(columns.column_default,'''::regclass)',''),'nextval(''','')=sequence_name LOOP EXECUTE 'select max('||sequencedefs.columnname||') from ' || sequencedefs.tablename INTO c; IF c is null THEN c = 0; END IF; IF c is not null THEN c = c+ 1; END IF; EXECUTE 'alter sequence ' || sequencedefs.sequencename ||' restart with ' || c; END LOOP; RETURN 1; END; $body$ LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION dol_util_triggerall(DoEnable boolean) RETURNS integer AS $BODY$ DECLARE mytables RECORD; BEGIN FOR mytables IN SELECT relname FROM pg_class WHERE relhastriggers IS TRUE AND relkind = 'r' AND NOT relname LIKE 'pg_%' LOOP IF DoEnable THEN EXECUTE 'ALTER TABLE ' || mytables.relname || ' ENABLE TRIGGER ALL'; ELSE EXECUTE 'ALTER TABLE ' || mytables.relname || ' DISABLE TRIGGER ALL'; END IF; END LOOP; RETURN 1; END; $BODY$ LANGUAGE 'PLPGSQL';
CREATE OR REPLACE FUNCTION dol_util_triggerall(DoEnable boolean) RETURNS integer AS $BODY$ DECLARE mytables RECORD; BEGIN FOR mytables IN SELECT relname FROM pg_class WHERE relhastriggers IS TRUE AND relkind = 'r' AND NOT relname LIKE 'pg_%' LOOP IF DoEnable THEN EXECUTE 'ALTER TABLE ' || mytables.relname || ' ENABLE TRIGGER ALL'; ELSE EXECUTE 'ALTER TABLE ' || mytables.relname || ' DISABLE TRIGGER ALL'; END IF; END LOOP; RETURN 1; END; $BODY$ LANGUAGE plpgsql;
-- Add triggers for timestamp fields
CREATE OR REPLACE FUNCTION update_modified_column_tms() RETURNS TRIGGER AS $$ BEGIN NEW.tms = now(); RETURN NEW; END; $$ LANGUAGE 'PLPGSQL';
CREATE OR REPLACE FUNCTION update_modified_column_tms() RETURNS TRIGGER AS $$ BEGIN NEW.tms = now(); RETURN NEW; END; $$ LANGUAGE plpgsql;
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_accountingtransaction FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_actioncomm FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_adherent FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
@ -75,7 +75,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_contratdet_log FOR E
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_cotisation FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_deplacement FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE OR REPLACE FUNCTION update_modified_column_date_m() RETURNS TRIGGER AS $$ BEGIN NEW.date_m = now(); RETURN NEW; END; $$ LANGUAGE 'PLPGSQL';
CREATE OR REPLACE FUNCTION update_modified_column_date_m() RETURNS TRIGGER AS $$ BEGIN NEW.date_m = now(); RETURN NEW; END; $$ LANGUAGE plpgsql;
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_date_m();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_entrepot FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_events FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
@ -96,7 +96,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product FOR EACH ROW
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_fournisseur_price FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_price FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE OR REPLACE FUNCTION update_modified_column_date_price() RETURNS TRIGGER AS $$ BEGIN NEW.date_price = now(); RETURN NEW; END; $$ LANGUAGE 'PLPGSQL';
CREATE OR REPLACE FUNCTION update_modified_column_date_price() RETURNS TRIGGER AS $$ BEGIN NEW.date_price = now(); RETURN NEW; END; $$ LANGUAGE plpgsql;
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_price_by_qty FOR EACH ROW EXECUTE PROCEDURE update_modified_column_date_price();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_stock FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_projet FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();

View File

@ -1,5 +1,3 @@
# Dolibarr language file - es_MX - banks
CHARSET=UTF-8
IBAN=CLAVE Interbancaria
BIC=Sucursal
BankAccountDomiciliation=Tarjeta

View File

@ -23,6 +23,4 @@ TerreNumRefModelDesc1=Devuelve el número bajo el formato %syymm-nnnn para las f
AddCreditNote=Crear nota de crédito
BillTo=Receptor
Residence=Tarjeta
IBANNumber=CLAVE Interbancaria
BICNumber=Sucursal
PaymentByTransferOnThisBankAccount=Cuenta para depositos y transferencias

View File

@ -0,0 +1,18 @@
# Dolibarr language file - Source file is en_US - admin
CHARSET=UTF-8
VATManagement=Gestion TPS
VATIsUsedDesc=Le taux de TPS proposé par défaut lors de la création de proposition commerciale, facture, commande, etc... répond à la règle standard suivante :<br>Si vendeur non assujetti à TPS, TPS par défaut=0. Fin de règle.<br>Si le (pays vendeur= pays acheteur) alors TPS par défaut=TPS du produit vendu. Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et bien vendu= moyen de transport neuf (auto, bateau, avion), TPS par défaut=0 (La TPS doit être payée par acheteur au centre d'impôts de son pays et non au vendeur). Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et acheteur= particulier alors TPS par défaut=TPS du produit vendu. Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et acheteur= entreprise alors TPS par défaut=0. Fin de règle.<br>Sinon TPS proposée par défaut=0. Fin de règle.<br>
VATIsNotUsedDesc=Le taux de TPS proposé par défaut est 0. C'est le cas d'associations, particuliers ou certaines petites sociétés.
VATIsUsedExampleFR=En France, il s'agit des sociétés ou organismes ayant choisi un régime fiscale réel (Réel simplifié ou Réel normal), régime dans lequel la TVA est déclarée.
VATIsNotUsedExampleFR=En France, il s'agit des associations ne déclarant pas de TVA ou sociétés, organismes ou professions libérales ayant choisi le régime fiscal micro entreprise (TVA en franchise) et payant une TVA en franchise sans faire de déclaration de TVA. Ce choix fait de plus apparaître la mention "TVA non applicable - art-293B du CGI" sur les factures.
##### Local Taxes #####
LocalTax1IsUsed=Assujeti
LocalTax1IsNotUsed=Non assujeti
LocalTax1IsUsedDesc=Utilisation de 2ème type taxe (TVQ)
LocalTax1IsNotUsedDesc=Pas d'utilisation de 2ème type taxe (TVQ)
LocalTax1Management=Gestion TVQ
LocalTax1ManagementCA= Gestion TVQ
LocalTax1IsUsedDescCA=
LocalTax1IsNotUsedDescCA=
LocalTax1IsUsedExampleCA=
LocalTax1IsNotUsedExampleCA=

View File

@ -0,0 +1,7 @@
# Dolibarr language file - en_US - companies
CHARSET=UTF-8
VATIsUsed=Assujetti à la TPS
VATIsNotUsed=Non assujetti à la TPS
##### Local Taxes #####
LocalTax1IsUsedES= Assujetti à TVQ
LocalTax1IsNotUsedES= Non assujetti à TVQ

View File

@ -13,4 +13,13 @@ FormatDateTextShort=%d %b %Y
FormatDateText=%d %B %Y
FormatDateHourShort=%d.%m.%Y %H:%M
FormatDateHourTextShort=%d %b %Y %H:%M
FormatDateHourText=%d %B %Y %H:%M
FormatDateHourText=%d %B %Y %H:%M
AmountVAT=Montant TPS
AmountLT1=Montant TVQ
TotalVAT=Total TPS
TotalLT1=Total TVQ
IncludedVAT=Dont TPS
VAT=TPS
LT1CA=TVQ
VATRate=Taux TPS
ErrorNoVATRateDefinedForSellerCountry=Erreur, aucun taux de taxe défini pour le pays '%s'.

View File

@ -983,9 +983,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
// jQuery jMobile
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
{
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
//$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jquerytreeview/jquery.treeview.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
}
}
@ -1149,11 +1147,22 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
}
// jQuery jMobile
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))
{
{
// We must force not using ajax because cache of jquery does not load js of other pages.
// This also increase seriously speed onto mobile device where complex js code is very slow and memory very low.
if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 2)
{
print '<script type="text/javascript">
$(document).bind("mobileinit", function(){
$.extend( $.mobile , {
ajaxFormsEnabled : false,
ajaxLinksEnabled : false, /* old param */
ajaxEnabled : false /* new param */
});
});
</script>';
}
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
//$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jquerytreeview/jquery.treeview.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js"></script>'."\n";
}
}
@ -1674,6 +1683,7 @@ function main_area($title='')
print "\n";
if (! empty($conf->dol_use_jmobile)) print '<div data-role="page">';
print '<div class="fiche"> <!-- begin div class="fiche" -->'."\n";
if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode",$conf->global->MAIN_ONLY_LOGIN_ALLOWED));
}
@ -1793,7 +1803,7 @@ if (! function_exists("llxFooter"))
print "\n\n";
print '</div> <!-- end div class="fiche" -->'."\n";
if (! empty($conf->dol_use_jmobile)) print '</div>'; // end data-role="page"
//XXX print "\n".'</td></tr></table> <!-- end right area -->'."\n";
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print '</div></div> <!-- end main layout -->'."\n";

View File

@ -2166,13 +2166,13 @@ class Product extends CommonObject
'fullpath' => $compl_path.$label, // Label
'type'=>$type // Nb of units that compose parent product
);
}
// Recursive call if child is an array
if (is_array($desc_pere['childs']))
{
//print 'YYY We go down for '.$desc_pere[3]." -> \n";
$this ->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1]*$multiply, $level+1);
// Recursive call if child is an array
if (is_array($desc_pere['childs']))
{
//print 'YYY We go down for '.$desc_pere[3]." -> \n";
$this ->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1]*$multiply, $level+1);
}
}
}
}

View File

@ -638,16 +638,16 @@ $formproduct = new FormProduct($db);
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
{
// -----------------------------------------
// When used with CANVAS
// -----------------------------------------
if (empty($object->error) && $id)
{
$object = new Product($db);
$result=$object->fetch($id);
if ($result <= 0) dol_print_error('',$object->error);
}
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
// -----------------------------------------
// When used with CANVAS
// -----------------------------------------
if (empty($object->error) && $id)
{
$object = new Product($db);
$result=$object->fetch($id);
if ($result <= 0) dol_print_error('',$object->error);
}
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
$objcanvas->display_canvas($action); // Show template
}
else
@ -1315,8 +1315,9 @@ print "\n</div><br>\n";
if ($object->id && ($action == '' || $action == 'view') && $object->status)
{
print '<table width="100%" class="noborder">';
//print '<div class="fichecenter"><div class="fichehalfleft">';
//Variable used to check if any text is going to be printed
$html = '';
//print '<div class="fichecenter"><div class="fichehalfleft">';
// Propals
if (! empty($conf->propal->enabled) && $user->rights->propale->creer)
@ -1325,42 +1326,42 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
$langs->load("propal");
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans("AddToOtherProposals").'</td>';
print '</tr><tr>';
print '<td valign="top">';
$html .= '<tr class="liste_titre">';
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherProposals").'</td>';
$html .= '</tr><tr>';
$html .= '<td valign="top">';
$var=true;
$otherprop = $propal->liste_array(2,1,0);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="nobordernopadding" width="100%">';
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$html .= '<table class="nobordernopadding" width="100%">';
if (is_array($otherprop) && count($otherprop))
{
$var=!$var;
print '<tr '.$bc[$var].'><td style="width: 200px;">';
print '<input type="hidden" name="action" value="addinpropal">';
print $langs->trans("Proposals").'</td><td colspan="2">';
print $form->selectarray("propalid", $otherprop, 0, 1);
print '</td></tr>';
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
print '</td></tr>';
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
$html .= '<input type="hidden" name="action" value="addinpropal">';
$html .= $langs->trans("Proposals").'</td><td colspan="2">';
$html .= $form->selectarray("propalid", $otherprop, 0, 1);
$html .= '</td></tr>';
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
$html .= '</td><td align="right">';
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
$html .= '</td></tr>';
}
else
{
print "<tr ".$bc[!$var]."><td>";
print $langs->trans("NoOtherOpenedPropals");
print '</td></tr>';
$html .= "<tr ".$bc[!$var]."><td>";
$html .= $langs->trans("NoOtherOpenedPropals");
$html .= '</td></tr>';
}
print '</table>';
print '</form>';
$html .= '</table>';
$html .= '</form>';
print '</td>';
print '</tr>';
$html .= '</td>';
$html .= '</tr>';
}
// Commande
@ -1370,42 +1371,42 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
$langs->load("orders");
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
print '</tr><tr>';
print '<td valign="top">';
$html .= '<tr class="liste_titre">';
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
$html .= '</tr><tr>';
$html .= '<td valign="top">';
$var=true;
$othercom = $commande->liste_array(2, 1, null);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="nobordernopadding" width="100%">';
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$html .= '<table class="nobordernopadding" width="100%">';
if (is_array($othercom) && count($othercom))
{
$var=!$var;
print '<tr '.$bc[$var].'><td style="width: 200px;">';
print '<input type="hidden" name="action" value="addincommande">';
print $langs->trans("Orders").'</td><td colspan="2">';
print $form->selectarray("commandeid", $othercom, 0, 1);
print '</td></tr>';
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
print '</td></tr>';
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
$html .= '<input type="hidden" name="action" value="addincommande">';
$html .= $langs->trans("Orders").'</td><td colspan="2">';
$html .= $form->selectarray("commandeid", $othercom, 0, 1);
$html .= '</td></tr>';
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
$html .= '</td><td align="right">';
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
$html .= '</td></tr>';
}
else
{
print "<tr ".$bc[!$var]."><td>";
print $langs->trans("NoOtherOpenedOrders");
print '</td></tr>';
$html .= "<tr ".$bc[!$var]."><td>";
$html .= $langs->trans("NoOtherOpenedOrders");
$html .= '</td></tr>';
}
print '</table>';
print '</form>';
$html .= '</table>';
$html .= '</form>';
print '</td>';
print '</tr>';
$html .= '</td>';
$html .= '</tr>';
}
// Factures
@ -1415,47 +1416,52 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
$langs->load("bills");
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
print '</tr><tr>';
print '<td valign="top">';
$var=true;
$otherinvoice = $invoice->liste_array(2, 1, null);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="nobordernopadding" width="100%">';
if (is_array($otherinvoice) && count($otherinvoice))
{
$var=!$var;
print '<tr '.$bc[$var].'><td style="width: 200px;">';
print '<input type="hidden" name="action" value="addinfacture">';
print $langs->trans("Invoice").'</td><td colspan="2">';
print $form->selectarray("factureid", $otherinvoice, 0, 1);
print '</td></tr>';
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
print '</td></tr>';
}
else
{
print "<tr ".$bc[!$var]."><td>";
print $langs->trans("NoOtherDraftBills");
print '</td></tr>';
}
print '</table>';
print '</form>';
print '</td>';
print '</tr>';
$html .= '<tr class="liste_titre">';
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
$html .= '</tr><tr>';
$html .= '<td valign="top">';
$var=true;
$otherinvoice = $invoice->liste_array(2, 1, null);
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$html .= '<table class="nobordernopadding" width="100%">';
if (is_array($otherinvoice) && count($otherinvoice))
{
$var=!$var;
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
$html .= '<input type="hidden" name="action" value="addinfacture">';
$html .= $langs->trans("Invoice").'</td><td colspan="2">';
$html .= $form->selectarray("factureid", $otherinvoice, 0, 1);
$html .= '</td></tr>';
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
$html .= '</td><td align="right">';
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
$html .= '</td></tr>';
}
else
{
$html .= "<tr ".$bc[!$var]."><td>";
$html .= $langs->trans("NoOtherDraftBills");
$html .= '</td></tr>';
}
$html .= '</table>';
$html .= '</form>';
$html .= '</td>';
$html .= '</tr>';
}
print '</table>';
print '<br>';
//If any text is going to be printed, then we show the table
if (!empty($html))
{
print '<table width="100%" class="noborder">';
print $html;
print '</table>';
print '<br>';
}
}

View File

@ -66,6 +66,9 @@ else
//ini_set('default_socket_timeout', $params['response_timeout']);
//$soapclient = new SoapClient($WS_DOL_URL_WSDL,$params);
$soapclient = new nusoap_client($WS_DOL_URL_WSDL,true,$params['proxy_host'],$params['proxy_port'],$params['proxy_login'],$params['proxy_password'],$params['connection_timeout'],$params['response_timeout']);
$soapclient->soap_defencoding = 'utf-8';
$soapclient->xml_encoding = 'utf-8';
$soapclient->decode_utf8 = false;
// Check for an error
$err = $soapclient->getError();

View File

@ -13,7 +13,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
body {

View File

@ -24,24 +24,13 @@
* \brief File that define environment for support pages
*/
// Just to define version DOL_VERSION
if (! defined('DOL_INC_FOR_VERSION_ERROR')) define('DOL_INC_FOR_VERSION_ERROR','1');
require_once '../filefunc.inc.php';
// Define DOL_DOCUMENT_ROOT and ADODB_PATH used for install/upgrade process
// Define DOL_DOCUMENT_ROOT
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..');
if (! defined('ADODB_PATH'))
{
$foundpath=DOL_DOCUMENT_ROOT .'/includes/adodbtime/';
if (! is_dir($foundpath)) $foundpath='/usr/share/php/adodb/';
define('ADODB_PATH', $foundpath);
}
require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once ADODB_PATH.'adodb-time.inc.php';
// Avoid warnings with strict mode E_STRICT
$conf = new stdClass(); // instantiate $conf explicitely

View File

@ -41,7 +41,7 @@ $langs->load("help");
* View
*/
pHeader($langs->trans("DolibarrHelpCenter").' '.DOL_VERSION, $_SERVER["PHP_SELF"]);
pHeader($langs->trans("DolibarrHelpCenter"), $_SERVER["PHP_SELF"]);
print $langs->trans("HelpCenterDesc1")."<br>\n";
print $langs->trans("HelpCenterDesc2")."<br>\n";