Merge remote-tracking branch 'origin/3.3' into develop

Conflicts:
	htdocs/langs/es_ES/admin.lang
This commit is contained in:
Laurent Destailleur 2013-01-05 16:41:08 +01:00
commit 5f99488c99
10 changed files with 110 additions and 47 deletions

View File

@ -237,8 +237,8 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
$type = $productsupplier->type;
// Local Taxes
$localtax1_tx= get_localtax($tva_tx, 1, $object->thirdparty);
$localtax2_tx= get_localtax($tva_tx, 2, $object->thirdparty);
$localtax1_tx= get_localtax($tva_tx, 1,$mysoc,$object->thirdparty);
$localtax2_tx= get_localtax($tva_tx, 2,$mysoc,$object->thirdparty);
$result=$object->addline(
$desc,
@ -268,8 +268,8 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
$tva_tx = price2num($_POST['tva_tx']);
// Local Taxes
$localtax1_tx= get_localtax($tva_tx, 1, $object->thirdparty);
$localtax2_tx= get_localtax($tva_tx, 2, $object->thirdparty);
$localtax1_tx= get_localtax($tva_tx, 1,$mysoc,$object->thirdparty);
$localtax2_tx= get_localtax($tva_tx, 2,$mysoc,$object->thirdparty);
if (! $_POST['dp_desc'])
{
@ -340,8 +340,8 @@ else if ($action == 'updateligne' && $user->rights->fournisseur->commande->creer
if ($product->fetch($_POST["elrowid"]) < 0) dol_print_error($db);
}
$localtax1_tx=get_localtax($_POST['tva_tx'],1,$object->thirdparty);
$localtax2_tx=get_localtax($_POST['tva_tx'],2,$object->thirdparty);
$localtax1_tx=get_localtax($_POST['tva_tx'],1,$mysoc,$object->thirdparty);
$localtax2_tx=get_localtax($_POST['tva_tx'],2,$mysoc,$object->thirdparty);
$result = $object->updateline(
$_POST['elrowid'],
@ -1065,12 +1065,17 @@ if (! empty($object->id))
if (! empty($conf->projet->enabled)) $nbrow++;
//Local taxes
//TODO: Place into a function to control showing by country or study better option
if ($mysoc->country_code=='ES')
{
if($mysoc->localtax1_assuj=="1") $nbrow++;
if($object->thirdparty->localtax2_assuj=="1") $nbrow++;
}
else
{
if($mysoc->localtax1_assuj=="1") $nbrow++;
if($mysoc->localtax2_assuj=="1") $nbrow++;
}
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/fourn/commande/liste.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
@ -1224,6 +1229,7 @@ if (! empty($object->id))
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
// Amount Local Taxes
//TODO: Place into a function to control showing by country or study better option
if ($mysoc->country_code=='ES')
{
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
@ -1232,7 +1238,22 @@ if (! empty($object->id))
print '<td align="right">'.price($object->total_localtax1).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
if ($object->thirdparty->localtax2_assuj=="1") //Localtax2 IRPF
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax2).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
}
else
{
if ($mysoc->localtax1_assuj=="1") //Localtax1
{
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax1).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
if ($mysoc->localtax2_assuj=="1") //Localtax2
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax2).'</td>';

View File

@ -454,8 +454,8 @@ elseif ($action == 'update_line')
}
$localtax1tx= get_localtax($_POST['tauxtva'], 1, $object->thirdparty);
$localtax2tx= get_localtax($_POST['tauxtva'], 2, $object->thirdparty);
$localtax1tx= get_localtax($_POST['tauxtva'], 1, $mysoc,$object->thirdparty);
$localtax2tx= get_localtax($_POST['tauxtva'], 2, $mysoc,$object->thirdparty);
$remise_percent=GETPOST('remise_percent');
$result=$object->updateline(GETPOST('lineid'), $label, $pu, GETPOST('tauxtva'), $localtax1tx, $localtax2tx, GETPOST('qty'), GETPOST('idprod'), $price_base_type, 0, $type, $remise_percent);
@ -502,8 +502,8 @@ elseif ($action == 'addline')
$tvatx=get_default_tva($object->thirdparty, $mysoc, $product->id, $_POST['idprodfournprice']);
$localtax1tx= get_localtax($tvatx, 1, $object->thirdparty);
$localtax2tx= get_localtax($tvatx, 2, $object->thirdparty);
$localtax1tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty);
$localtax2tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty);
$remise_percent=GETPOST('remise_percent');
$type = $product->type;
@ -520,8 +520,8 @@ elseif ($action == 'addline')
else
{
$tauxtva = price2num($_POST['tauxtva']);
$localtax1tx= get_localtax($tauxtva, 1, $object->thirdparty);
$localtax2tx= get_localtax($tauxtva, 2, $object->thirdparty);
$localtax1tx= get_localtax($tauxtva, 1, $mysoc,$object->thirdparty);
$localtax2tx= get_localtax($tauxtva, 2, $mysoc,$object->thirdparty);
$remise_percent=GETPOST('remise_percent');
if (! $_POST['dp_desc'])
@ -1382,9 +1382,17 @@ else
// Local taxes
// TODO I use here $societe->localtax1_assuj. Before it was $mysoc->localtax1_assuj, but this is a supplier invoice, so made by supplier, so depends on supplier properties
if ($societe->localtax1_assuj=="1") $nbrows++;
if ($societe->localtax2_assuj=="1") $nbrows++;
if ($mysoc->country_code=='ES')
{
if($mysoc->localtax1_assuj=="1") $nbrows++;
if($societe->localtax2_assuj=="1") $nbrows++;
}
else
{
if ($societe->localtax1_assuj=="1") $nbrows++;
if ($societe->localtax2_assuj=="1") $nbrows++;
}
print '<td rowspan="'.$nbrows.'" valign="top">';
$sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,';
@ -1493,19 +1501,37 @@ else
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($object->total_tva).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->currency).'</td></tr>';
// Amount Local Taxes
if ($societe->localtax1_assuj=="1") //Localtax1 RE
//TODO: Place into a function to control showing by country or study better option
if ($mysoc->country_code=='ES')
{
print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax1).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
{
print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax1).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
if ($societe->localtax2_assuj=="1") //Localtax2 IRPF
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax2).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
}
if ($societe->localtax2_assuj=="1") //Localtax2 IRPF
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax2).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
else
{
if ($societe->localtax1_assuj=="1") //Localtax1 RE
{
print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax1).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
if ($societe->localtax2_assuj=="1") //Localtax2 IRPF
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax2).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
}
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right">'.price($object->total_ttc).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->currency).'</td></tr>';
// Project

View File

@ -190,10 +190,10 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (20
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2023, 202, '0', '0', 'VAT Rate 0', 1);
-- SPAIN (id country=4)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4,'21','0','5.2','3','-15','1','VAT standard rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-15','1','VAT reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-15','1','VAT super-reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4, '0','0', '0','3','-15','1','VAT Rate 0',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4,'21','0','5.2','3','-21','1','VAT standard rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-21','1','VAT reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-21','1','VAT super-reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4, '0','0', '0','3','-21','1','VAT Rate 0',1);
-- SWEDEN (id country=20)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (201,20, '25','0','VAT standard rate',1);

View File

@ -1,5 +1,6 @@
# Dolibarr language file - en_US - admin
CHARSET=UTF-8
Foundation=Foundation
Version=Version
VersionProgram=Version program
VersionLastInstall=Version initial install
@ -61,7 +62,9 @@ PreviewNotAvailable=Preview not available
ThemeCurrentlyActive=Theme currently active
CurrentTimeZone=TimeZone PHP (server)
Space=Space
Table=Table
Fields=Fields
Index=Index
Mask=Mask
NextValue=Next value
NextValueForInvoices=Next value (invoices)
@ -128,6 +131,7 @@ SystemInfo=System information
SystemTools=System tools
SystemToolsArea=System tools area
SystemToolsAreaDesc=This area provides administration features. Use the menu to choose the feature you're looking for.
Purge=Purge
PurgeAreaDesc=This page allows you to delete all files built or stored by Dolibarr (temporary files or all files in <b>%s</b> directory). Using this feature is not necessary. It is provided for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files built by the web server.
PurgeDeleteLogFile=Delete log file <b>%s</b> defined for Syslog module (no risk to loose data)
PurgeDeleteTemporaryFiles=Delete all temporary files (no risk to loose data)
@ -156,6 +160,7 @@ ImportPostgreSqlDesc=To import a backup file, you must use pg_restore command fr
ImportMySqlCommand=%s %s < mybackupfile.sql
ImportPostgreSqlCommand=%s %s mybackupfile.sql
FileNameToGenerate=File name to generate
Compression=Compression
CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import
CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later
ExportCompatibility=Compatibility of generated export file
@ -328,6 +333,7 @@ HideAnyVATInformationOnPDF=Hide all information related to VAT on generated PDF
HideDescOnPDF=Hide products description on generated PDF
HideRefOnPDF=Hide products ref. on generated PDF
HideDetailsOnPDF=Hide products lines details on generated PDF
Library=Library
UrlGenerationParameters=Parameters to secure URLs
SecurityTokenIsUnique=Use a unique securekey parameter for each URL
EnterRefToBuildUrl=Enter reference for object %s
@ -344,6 +350,7 @@ TextLong=Long text
Int=Integer
Float=Float
DateAndTime=Date and hour
Unique=Unique
LibraryToBuildPDF=Library used to build PDF
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:<br>1 : local tax apply on products and services without vat (vat is not applied on local tax)<br>2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)<br>3 : local tax apply on products without vat (vat is not applied on local tax)<br>4 : local tax apply on products before vat (vat is calculated on amount + localtax)<br>5 : local tax apply on services without vat (vat is not applied on local tax)<br>6 : local tax apply on services before vat (vat is calculated on amount + localtax)
@ -453,6 +460,7 @@ Module2600Name= WebServices
Module2600Desc= Enable the Dolibarr web services server
Module2700Name= Gravatar
Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access
Module2800Desc=FTP Client
Module2900Name= GeoIPMaxmind
Module2900Desc= GeoIP Maxmind conversions capabilities
Module5000Name=Multi-company
@ -757,6 +765,8 @@ PhpConf=Conf
PhpWebLink=Web-Php link
Pear=Pear
PearPackages=Pear Packages
Browser=Browser
Server=Server
Database=Database
DatabaseServer=Database host
DatabaseName=Database name
@ -782,6 +792,7 @@ MenuCompanySetup=Company/Foundation
MenuNewUser=New user
MenuTopManager=Top menu manager
MenuLeftManager=Left menu manager
MenuManager=Menu manager
MenuSmartphoneManager=Smartphone menu manager
DefaultMenuTopManager=Top menu manager
DefaultMenuLeftManager=Left menu manager
@ -806,6 +817,7 @@ CompanyZip=Zip
CompanyTown=Town
CompanyCountry=Country
CompanyCurrency=Main currency
Logo=Logo
DoNotShow=Do not show
DoNotSuggestPaymentMode=Do not suggest
NoActiveBankAccountDefined=No active bank account defined

View File

@ -328,6 +328,7 @@ HideAnyVATInformationOnPDF=Ocultar toda la información relacionada con el IVA e
HideDescOnPDF=Ocultar descripción de los productos en la generación de los PDF
HideRefOnPDF=Ocultar referencia de los productos en la generación de los PDF
HideDetailsOnPDF=Ocultar detalles de las líneas de productos en la generación de los PDF
Library=Librería
UrlGenerationParameters=Seguridad de las URLs
SecurityTokenIsUnique=¿Usar un parámetro securekey único para cada URL?
EnterRefToBuildUrl=Introduzca la referencia del objeto %s
@ -346,6 +347,7 @@ TextLong=Texto largo
Int=Numérico entero
Float=Decimal
DateAndTime=Fecha y hora
Unique=Único
LibraryToBuildPDF=Librería usada para la creación de archivos PDF
WarningUsingFPDF=Atención: Su archivo <b>conf.php</b> contiene la directiva <b>dolibarr_pdf_force_fpdf=1</b>. Esto hace que se use la librería FPDF para generar sus archivos PDF. Esta librería es antigua y no cubre algunas funcionalidades (Unicode, transparencia de imágenes, idiomas cirílicos, árabes o asiáticos, etc.), por lo que puede tener problemas en la generación de los PDF.<br>Para resolverlo, y disponer de un soporte completo de PDF, puede descargar la <a href="http://www.tcpdf.org/" target="_blank">librería TCPDF</a> , y a continuación comentar o eliminar la línea <b>$dolibarr_pdf_force_fpdf=1</b>, y añadir en su lugar <b>$dolibarr_lib_TCPDF_PATH='ruta_a_TCPDF'</b>
LocalTaxDesc=Algunos países aplican 2 o 3 tasas a cada línea de factura. Si es el caso, escoja el tipo de la segunda y tercera tasa y su valor. Los posibles tipos son:<br>1 : tasa local aplicable a productos y servicios sin IVA (IVA no se aplica en la tasa local)<br>2 : tasa local se aplica a productos y servicios antes del IVA (IVA se calcula sobre importe+tasa local)<br>3 : tasa local se aplica a productos sin IVA (IVA no se aplica en la tasa local)<br>4 : tasa local se aplica a productos antes del IVA (IVA se calcula sobre el importe+tasa local)<br>5 : tasa local se aplica a servicios sin IVA (IVA no se aplica a la tasa local)<br>6 : tasa local se aplica a servicios antes del IVA (IVA se calcula sobre importe + tasa local)
@ -1312,7 +1314,7 @@ ConfirmDeleteLine=¿Está seguro de querer eliminar esta línea?
##### Tax #####
TaxSetup=Configuración del módulo Impuestos, cargas sociales y dividendos
OptionVatMode=Opción de carga de IVA
OptionVATDefault=Estandard
OptionVATDefault=Estándar
OptionVATDebitOption=Opción servicios a débito
OptionVatDefaultDesc=La carga del IVA es: <br>-en el envío de los bienes (en la práctica se usa la fecha de la factura)<br>-sobre el pago por los servicios
OptionVatDebitOptionDesc=La carga del IVA es: <br>-en el envío de los bienes (en la práctica se usa la fecha de la factura)<br>-sobre la facturación de los servicios

View File

@ -109,6 +109,7 @@ AnnualByCompaniesDueDebtMode=Balance de ingresos y gastos, desglosado por tercer
AnnualByCompaniesInputOutputMode=Balance de ingresos y gastos, desglosado por terceros, en modo <b>%sIngresos-Gastos%s</b> llamada <b>contabilidad de caja</b>.
SeeReportInInputOutputMode=Ver el informe <b>%sIngresos-Gastos%s</b> llamado <b>contabilidad de caja</b> para un cálculo sobre las facturas pagadas
SeeReportInDueDebtMode=Ver el informe <b>%sCréditos-Deudas%s</b> llamada <b>contabilidad de compromiso</b> para un cálculo de las facturas pendientes de pago
RulesAmountWithTaxIncluded=- Los importes mostrados son con todos los impuestos incluídos.
RulesResultDue=- Los importes mostrados son importes totales<br>- Incluye las facturas, cargas e IVA debidos, que estén pagadas o no.<br>- Se basa en la fecha de validación para las facturas y el IVA y en la fecha de vencimiento para las cargas.<br>
RulesResultInOut=- Los importes mostrados son importes totales<br>- Incluye los pagos realizados para las facturas, cargas e IVA.<br>- Se basa en la fecha de pago de las mismas.<br>
RulesCADue=- Incluye las facturas a clientes, estén pagadas o no.<br>- Se base en la fecha de validación de las mismas.<br>

View File

@ -30,7 +30,7 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require '../../main.inc.php';
$id=GETPOST('tag');
$tag=GETPOST('tag');
if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not enabled');
@ -39,22 +39,22 @@ if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not
* Actions
*/
if ($id!='')
if ($tag!='')
{
$statut='2';
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE tag='".$id."'";
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE tag='".$db->escape($tag)."'";
dol_syslog("public/emailing/mailing-read.php : Mail read : ".$sql, LOG_DEBUG);
$resql=$db->query($sql);
//Update status communication of thirdparty prospect
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=3 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$id."' AND source_type='thirdparty' AND source_id is not null)";
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=3 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$db->escape($tag)."' AND source_type='thirdparty' AND source_id is not null)";
dol_syslog("public/emailing/mailing-read.php : Mail read thirdparty : ".$sql, LOG_DEBUG);
$resql=$db->query($sql);
//Update status communication of contact prospect
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=3 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.tag = '".$id."' AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)";
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=3 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.tag = '".$db->escape($tag)."' AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)";
dol_syslog("public/emailing/mailing-read.php : Mail read contact : ".$sql, LOG_DEBUG);
$resql=$db->query($sql);

View File

@ -36,7 +36,7 @@ global $user, $conf, $langs;
$langs->load("main");
$langs->load("mails");
$id=GETPOST('tag');
$tag=GETPOST('tag');
$unsuscrib=GETPOST('unsuscrib');
if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not enabled');
@ -46,30 +46,30 @@ if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not
* Actions
*/
if (($id!='') && ($unsuscrib=='1'))
if (($tag!='') && ($unsuscrib=='1'))
{
//Udate status of mail in Destinaries maling list
$statut='3';
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE tag='".$id."'";
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE tag='".$db->escape($tag)."'";
dol_syslog("public/emailing/mailing-unsubscribe.php : Mail unsubcribe : ".$sql, LOG_DEBUG);
$resql=$db->query($sql);
//Update status communication of thirdparty prospect
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$id."' AND source_type='thirdparty' AND source_id is not null)";
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$db->escape($tag)."' AND source_type='thirdparty' AND source_id is not null)";
dol_syslog("public/emailing/mailing-unsubscribe.php : Mail unsubcribe thirdparty : ".$sql, LOG_DEBUG);
$resql=$db->query($sql);
//Update status communication of contact prospect
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.tag = '".$id."' AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)";
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=-1 WHERE rowid IN (SELECT fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.tag = '".$db->escape($tag)."' AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)";
dol_syslog("public/emailing/mailing-unsubscribe.php : Mail unsubcribe contact : ".$sql, LOG_DEBUG);
$resql=$db->query($sql);
$sql = "SELECT mc.email";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
$sql .= " WHERE mc.tag='".$id."'";
$sql .= " WHERE mc.tag='".$db->escape($tag)."'";
$resql=$db->query($sql);

View File

@ -498,7 +498,7 @@ if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
print '<tr><td>'.$langs->trans("PasswordAgain").' <FONT COLOR="red">*</FONT></td><td><input type="password" name="pass2" size="20" value="'.GETPOST("pass2").'"></td></tr>'."\n";
}
// Birthday
print '<tr><td>'.$langs->trans("DateToBirth").'</td><td>';
print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateToBirth").'</td><td>';
print $form->select_date($birthday,'birth',0,0,1,"newmember");
print '</td></tr>'."\n";
// Photo
@ -551,8 +551,9 @@ if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
}
if (jQuery("#morphy").val()==\'mor\') {
jQuery(".amount").val(\'\');
jQuery("#trbudget").show();
jQuery("#trcompany").show();
jQuery("#trbirth").hide();
jQuery("#trbudget").show();
if (jQuery("#budget").val() > 0) { jQuery(".amount").val(jQuery("#budget").val()); }
else { jQuery("#budget").val(\'\'); }
}

View File

@ -816,8 +816,8 @@ a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:<?php p
font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #93a5aa; }
a.vmenu:link, a.vmenu:visited { color: #<?php echo $colortextmain; ?>; }
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active { font-size:<?php print ($fontsize-1) ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; padding: 1px 1px 1px 8px; }
font.vsmenudisabled { font-size:<?php print ($fontsize-1) ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #93a5aa; margin: 1px 1px 1px 8px; }
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #202020; padding: 1px 1px 1px 8px; }
font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #93a5aa; margin: 1px 1px 1px 8px; }
a.vsmenu:link, a.vsmenu:visited { color: #<?php echo $colortextmain; ?>; }
a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #666666; }