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

This commit is contained in:
Laurent Destailleur 2013-10-14 15:56:42 +02:00
commit 0d36329336
35 changed files with 143 additions and 69 deletions

View File

@ -41,18 +41,18 @@ For users:
- New: A more responsive desgin for statistic box of home page.
- Qual: Implement same rule for return value of all command line scripts (0 when success, <>0 if error).
- New: [ task #1005 ] Adapting to Spanish legislation bill numbering
- New: [ task #1011 ] Now supplier order and invoice deal with payment terms and mode
- New: [ task #1014 ] Add option to recursivly add parent category
- New: [ task #1016 ] Can define a specific numbering for deposits
- New: [ task #918 ] Stock replenishment
- Fix: [ bug #992 ] Proforma invoices don't have a separated numeric count
- New : Add pdf link into supplier invoice list and supplier order list
- New : Genrate auto the PDF for supplier invoice
- New : Add category into filter webservice thirdparty method getListOfThirdParties
- New : Allow to define margin or mark rate during quoting, ordering, invoicing
- New : User permissions on margin module
- New : Add ref supplier into muscadet model
- New : Add ability to copy contact address to clipboard
- New: [ task #1011 ] Now supplier order and invoice deal with payment terms and mode.
- New: [ task #1014 ] Add option to recursivly add parent category.
- New: [ task #1016 ] Can define a specific numbering for deposits.
- New: [ task #918 ] Stock replenishment.
- Fix: [ bug #992 ] Proforma invoices don't have a separated numeric count.
- New : Add pdf link into supplier invoice list and supplier order list.
- New : Genrate auto the PDF for supplier invoice.
- New : Add category into filter webservice thirdparty method getListOfThirdParties.
- New : Allow to define margin or mark rate during quoting, ordering, invoicing.
- New : User permissions on margin module.
- New : Add ref supplier into muscadet model/
- New : Add ability to copy contact address to clipboard.
- New: Can use tag {mm} before {yy} even when there is a reset into numbering masks.
- New: [ task #1060 ] Register fields localtax(1|2)_type into details tables.
- New: [ task #923 ] Localtax support for ODT templates.

View File

@ -0,0 +1 @@
http://en.wikipedia.org/wiki/VAT_identification_number

View File

@ -57,6 +57,14 @@ if ($user->societe_id > 0)
$socid = $user->societe_id;
}
$object=new Facture($db);
// Load object
if ($facid > 0)
{
$ret=$object->fetch($facid);
}
// Initialize technical object to manage hooks of paiements. Note that conf->hooks_modules contains array array
$hookmanager = new HookManager($db);
$hookmanager->initHooks(array('paiementcard'));

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
@ -464,7 +464,7 @@ abstract class CommonObject
$sql.= " WHERE tc.element='".$this->element."'";
if ($activeonly == 1)
$sql.= " AND tc.active=1"; // only the active type
if (! empty($source)) $sql.= " AND tc.source='".$source."'";
$sql.= " ORDER by tc.".$order;
@ -1112,9 +1112,9 @@ abstract class CommonObject
$row = $this->db->fetch_row($resql);
$rows[] = $row[0]; // Add parent line into array rows
$childrens = $this->getChildrenOfLine($row[0]);
if (! empty($children))
if (! empty($childrens))
{
foreach($children as $child)
foreach($childrens as $child)
{
array_push($rows, $child);
}
@ -2621,7 +2621,7 @@ abstract class CommonObject
}
}
/* This is to show add lines */

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2006 Marc Barilley/Ocebo <marc@ocebo.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
@ -800,7 +800,7 @@ class Form
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
if ($conf->global->SOCIETE_ADD_REF_IN_LIST) {
if (($obj->client) && (!empty($obj->code_client))) {
$label = $obj->code_client. ' - ';
@ -814,7 +814,7 @@ class Form
{
$label=$obj->nom;
}
if ($showtype)
{
if ($obj->client || $obj->fournisseur) $label.=' (';
@ -2484,9 +2484,9 @@ class Form
/**
* Show a confirmation HTML form or AJAX popup.
* Easiest way to use this is with useajax=1.
* If you use useajax='xxx', you must also add jquery code to trigger opening of box (with correct parameters)
* just after calling this method. For example:
* Easiest way to use this is with useajax=1.
* If you use useajax='xxx', you must also add jquery code to trigger opening of box (with correct parameters)
* just after calling this method. For example:
* print '<script type="text/javascript">'."\n";
* print 'jQuery(document).ready(function() {'."\n";
* print 'jQuery(".xxxlink").click(function(e) { jQuery("#aparamid").val(jQuery(this).attr("rel")); jQuery("#dialog-confirm-xxx").dialog("open"); return false; });'."\n";
@ -2587,9 +2587,9 @@ class Form
$more.='</table>'."\n";
}
// JQUI method dialog is broken with jmobile, we use standard HTML.
// JQUI method dialog is broken with jmobile, we use standard HTML.
// Note: When using dol_use_jmobile, you must also check code for button use a GET url with action=xxx and output the confirm code only when action=xxx
if (! empty($conf->dol_use_jmobile)) $useajax=0;
if (! empty($conf->dol_use_jmobile)) $useajax=0;
if ($useajax && $conf->use_javascript_ajax)
{
@ -3376,7 +3376,7 @@ class Form
// Disabled if seller is not subject to VAT
$disabled=false; $title='';
if (is_object($societe_vendeuse) && $societe_vendeuse->id == $mysoc->id && $societe_vendeuse->tva_assuj == "0")
if (is_object($societe_vendeuse) && $societe_vendeuse->id == $mysoc->id && $societe_vendeuse->tva_assuj == "0")
{
$title=' title="'.$langs->trans('VATIsNotUsed').'"';
$disabled=true;

View File

@ -106,11 +106,12 @@ class Translate
// Array force long code from first part, even if long code is defined
$longforshort=array('ar'=>'ar_SA');
if (isset($longforshort[strtolower($langpart[0])])) $srclang=$longforshort[strtolower($langpart[0])];
else {
else if (! is_numeric($langpart[1])) { // Second part YY may be a numeric with some Chrome browser
$srclang=strtolower($langpart[0])."_".strtoupper($langpart[1]);
$longforlong=array('no_nb'=>'nb_NO');
if (isset($longforlong[strtolower($srclang)])) $srclang=$longforlong[strtolower($srclang)];
}
else $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]);
}
else { // If it's for a codetouse that is a short code xx
// Array to convert short lang code into long code.
@ -787,11 +788,11 @@ class Translate
function get_translations_for_substitutions() {
$substitutionarray = array();
foreach($this->tab_translate as $code => $label) {
$substitutionarray['lang_'.$code] = $label;
}
return $substitutionarray;
}
}

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2010-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
@ -65,7 +65,7 @@
{
if ($line->fk_product > 0) {
echo $form->textwithtooltip($text,$description,3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):''));
echo $form->textwithtooltip($text,$description,3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
// Show range
echo get_date_range($line->date_start, $line->date_end);
@ -78,14 +78,14 @@
} else {
if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
if ($type==1) $text = img_object($langs->trans('Service'),'service');
else $text = img_object($langs->trans('Product'),'product');
if (! empty($line->label)) {
$text.= ' <strong>'.$line->label.'</strong>';
echo $form->textwithtooltip($text,dol_htmlentitiesbr($line->description),3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):''));
echo $form->textwithtooltip($text,dol_htmlentitiesbr($line->description),3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
} else {
if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
echo $text.' '.dol_htmlentitiesbr($line->description);
}

View File

@ -70,11 +70,6 @@ $hidedesc = (GETPOST('hidedesc','int') ? GETPOST('hidedesc','int') : (! empty(
$hideref = (GETPOST('hideref','int') ? GETPOST('hideref','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0));
$object = new Expedition($db);
// Load object
if ($id > 0 || ! empty($ref))
{
$ret=$object->fetch($id, $ref);
}
// Load object
if ($id > 0 || ! empty($ref))
@ -95,8 +90,6 @@ if ($action == 'add')
{
$error=0;
$object = new Expedition($db);
$db->begin();
$object->note = GETPOST('note','alpha');

View File

@ -301,3 +301,12 @@ ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_cond_reglement integer NULL;
insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (9,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1);
create table llx_contrat_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;

View File

@ -0,0 +1,20 @@
-- ===================================================================
-- Copyright (C) 2013 Charles-Fr BENKE <charles.fr@benke.fr>
--
-- 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
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ===================================================================
ALTER TABLE llx_contrat_extrafields ADD INDEX idx_contrat_extrafields (fk_object);

View File

@ -0,0 +1,25 @@
-- ========================================================================
-- Copyright (C) 2013 Charles-Fr BENKE <charles.fr@benke.fr>
--
-- 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
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- ========================================================================
create table llx_contrat_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
ProfId6=Professional ID 6
ProfId1AR=Проф. Id едно (CUIT / Cuil)
ProfId1AR=Проф. Id едно (CUIL)
ProfId2AR=Проф. Id 2 (Revenu зверове)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professionel ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (revenu Bestier)
ProfId3AR=-
ProfId4AR=-

View File

@ -301,7 +301,7 @@ ProfId1NL=KVK nummer
ProfId2NL=-
ProfId3NL=-
ProfId4NL=-
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu Bestien)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu Bestien)
ProfId3AR=-
ProfId4AR=-

View File

@ -22,6 +22,7 @@ Language_es_AR=Spanish (Argentina)
Language_es_HN=Spanish (Honduras)
Language_es_MX=Spanish (Mexico)
Language_es_PY=Spanish (Paraguay)
Language_es_PE=Spanish (Peru)
Language_es_PR=Spanish (Puerto Rico)
Language_et_EE=Estonian
Language_fa_IR=Persian

View File

@ -1,3 +1,6 @@
# Dolibarr language file - es_AR - companies
CHARSET=UTF-8
CompanyHasCreditNote=Este cliente tiene <b>%s %s</b> notas de crédito/anticipos disponibles
VATIntra=CUIT
VATIntraShort=CUIT
VATIntraVeryShort=CUIT

View File

@ -21,6 +21,8 @@ Language_es_ES=Español
Language_es_AR=Español (Argentina)
Language_es_HN=Español (Honduras)
Language_es_MX=Español (México)
Language_es_PY=Español (Paraguay)
Language_es_PE=Español (Perú)
Language_es_PR=Español (Puerto Rico)
Language_et_EE=Estonio
Language_fa_IR=Persa
@ -29,6 +31,7 @@ Language_fr_BE=Francés (Bélgica)
Language_fr_CA=Francés (Canadá)
Language_fr_CH=Francés (Suiza)
Language_fr_FR=Francés
Language_fr_NC=Francés (Nueva Caledonia)
Language_he_IL=Hebreo
Language_hu_HU=Húngaro
Language_is_IS=Islandés

View File

@ -1,4 +1,7 @@
# Dolibarr language file - es_HN - companies
CHARSET=UTF-8
VATIsUsed=Sujeto a ISV
VATIsNotUsed=No sujeto a ISV
VATIsNotUsed=No sujeto a ISV
VATIntra=RTN
VATIntraShort=RTN
VATIntraVeryShort=RTN

View File

@ -2,4 +2,7 @@
CHARSET=UTF-8
State=Estado
Town=Municipio
CompanyHasCreditNote=Este cliente tiene <b>%s %s</b> notas de crédito/anticipos disponibles
CompanyHasCreditNote=Este cliente tiene <b>%s %s</b> notas de crédito/anticipos disponibles
VATIntra=RFC
VATIntraShort=RFC
VATIntraVeryShort=RFC

View File

@ -1,4 +1,7 @@
# Dolibarr language file - es_PU - companies
CHARSET=UTF-8
VATIsUsed=Sujeto a IGV
VATIsNotUsed=No sujeto a IGV
VATIsNotUsed=No sujeto a IGV
VATIntra=RUC
VATIntraShort=RUC
VATIntraVeryShort=RUC

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu brutes)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional-tunnuksen 3
ProfId4=Professional-tunnuksen 4
ProfId5=Ammatillinen tunnus 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (revenu brutes)
ProfId3AR=-
ProfId4AR=-

View File

@ -22,6 +22,7 @@ Language_es_AR=Espagnol (Argentine)
Language_es_HN=Espagnol (Honduras)
Language_es_MX=Espagnol (Mexique)
Language_es_PY=Espagnol (Paraguay)
Language_es_PE=Espagnol (Peru)
Language_es_PR=Espagnol (Puerto Rico)
Language_et_EE=Estonien
Language_fa_IR=Perse

View File

@ -104,7 +104,7 @@ ProfId3=Szakmai ID 3
ProfId4=Szakmai ID 4
ProfId5=Szakmai ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof ID 1 (CUIT / CUIL)
ProfId1AR=Prof ID 1 (CUIL)
ProfId2AR=Prof ID 2 (revenu barmok)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / CUIL)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu brutes)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Profesjonell ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof ID 2 (inntekter på brutes)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professioneel ID 3
ProfId4=Professioneel ID 4
ProfId5=Professionele ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (Cuit / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu woestelingen)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Profesjonalne ID 3
ProfId4=Profesjonalne ID 4
ProfId5=Profesjonalny ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Id Prof 2 (bydlęta Revenu)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=ID profesional 3
ProfId4=ID profesional 4
ProfId5=Professional ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / CUIL)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Id Prof 2 (brutos Revenu)
ProfId3AR=-
ProfId4AR=-
@ -224,9 +224,9 @@ ProfId3RU=Prof Id 3 (KPP)
ProfId4RU=Prof Id 4 (OKPO)
ProfId5RU=-
# ProfId6RU=-
VATIntra=IVA Intracomunitário
VATIntraShort=IVA Intracomunitário Mínimo
VATIntraVeryShort=IVA Intracomunitário Nulo
VATIntra=CNPJ
VATIntraShort=CNPJ
VATIntraVeryShort=CNPJ
VATIntraSyntaxIsValid=Sintaxe Válida
VATIntraValueIsValid=Valor Válido
ProspectCustomer=Cliente Potencial/Cliente

View File

@ -104,7 +104,7 @@ ProfId3=Professional ID 3
ProfId4=Professional ID 4
ProfId5=Professional ID 5
ProfId6=Profesional ID 6
ProfId1AR=Id-ul prof. 1 (CUIT / Cuil)
ProfId1AR=Id-ul prof. 1 (CUIL)
ProfId2AR=Id-ul prof. 2 (Venituri brute)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Профессиональный ID 3
ProfId4=Профессиональный ID 4
ProfId5=Профессиональный ID 5
# ProfId6=Professional ID 6
ProfId1AR=Проф Id 1 (CUIT / Cuil)
ProfId1AR=Проф Id 1 (CUIL)
ProfId2AR=Проф Id 2 (Revenu скоты)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Professionella ID 3
ProfId4=Professionella ID 4
ProfId5=Professionell ID 5
# ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (Revenu sällar)
ProfId3AR=-
ProfId4AR=-

View File

@ -104,7 +104,7 @@ ProfId3=Profesyonel ID 3
ProfId4=Profesyonel ID 4
ProfId5=Profesyonel ID 5
ProfId6=Professional ID 6
ProfId1AR=Prof Id 1 (CUIT / Cuil)
ProfId1AR=Prof Id 1 (CUIL)
ProfId2AR=Prof Id 2 (revenu canavarlar)
ProfId3AR=-
ProfId4AR=-

View File

@ -460,14 +460,14 @@ if ($resql)
print '</form>';
$arrayofuniqueproduct=array();
$var=True;
while ($i < min($num,$conf->liste_limit))
{
$objp = $db->fetch_object($resql);
$arrayofuniqueproduct[$objp->rowid]=$objp->produit;
$var=!$var;
print "<tr ".$bc[$var].">";
// Id movement
@ -517,7 +517,7 @@ if ($resql)
if (count($arrayofuniqueproduct) == 1)
{
$productidselected=0;
foreach ($arrayofuniqueproduct as $key => $val)
foreach ($arrayofuniqueproduct as $key => $val)
{
$productidselected=$key;
$productlabelselected=$val;
@ -533,16 +533,16 @@ if ($resql)
//print '<td class="liste_total" colspan="6" align="right">';
print ': '.$balancebefore;
print "<br>\n";
//print '</td></tr>';
//print '</td></tr>';
//print '<tr class="total"><td class="liste_total">';
print $langs->trans("NbOfProductAfterPeriod", $productlabelselected, dol_print_date($dateafter,'day','gmt'));
//print '</td>';
//print '<td class="liste_total" colspan="6" align="right">';
print ': '.$balanceafter;
print "<br>\n";
//print '</td></tr>';
//print '</td></tr>';
}
}
else