mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_orderextrafield Conflicts: htdocs/install/mysql/migration/3.3.0-3.4.0.sql Change-Id: I91fe24831dca9e1d9e6b09f85dd4b7bd37bd638e
This commit is contained in:
commit
0427080a4e
|
|
@ -29,6 +29,7 @@ For users:
|
|||
and a delay.
|
||||
- New: Can define a different clicktodial setup per user.
|
||||
- New: Add option INVOICE_CAN_NEVER_BE_REMOVED.
|
||||
- New: Enhance agenda module to reach RFC2445 (add busy information).
|
||||
- First change to prepare feature click to print for PDF.
|
||||
|
||||
For translators:
|
||||
|
|
|
|||
|
|
@ -48,11 +48,13 @@ if ($action == 'update')
|
|||
$amount=GETPOST('MEMBER_NEWFORM_AMOUNT');
|
||||
$editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||
$payonline=GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||
$email=GETPOST('MEMBER_PAYONLINE_SENDEMAIL');
|
||||
|
||||
$res=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$public,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$amount,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$editamount,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$payonline,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_PAYONLINE_SENDEMAIL",$email,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
|
|
@ -90,22 +92,39 @@ if ($conf->use_javascript_ajax)
|
|||
{
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print 'jQuery(document).ready(function () {
|
||||
function initemail()
|
||||
{
|
||||
if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\')
|
||||
{
|
||||
jQuery("#tremail").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery("#tremail").show();
|
||||
}
|
||||
}
|
||||
function initfields()
|
||||
{
|
||||
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'0\')
|
||||
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'0\')
|
||||
{
|
||||
jQuery(".drag").hide();
|
||||
jQuery("#tramount").hide();
|
||||
jQuery("#tredit").hide();
|
||||
jQuery("#trpayment").hide();
|
||||
jQuery("#tremail").hide();
|
||||
}
|
||||
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'1\')
|
||||
{
|
||||
jQuery(".drag").show();
|
||||
}
|
||||
}
|
||||
initfields();
|
||||
jQuery("#MEMBER_ENABLE_PUBLIC").change(function() {
|
||||
initfields();
|
||||
});
|
||||
})';
|
||||
jQuery("#tramount").show();
|
||||
jQuery("#tredit").show();
|
||||
jQuery("#trpayment").show();
|
||||
if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\') jQuery("#tremail").hide();
|
||||
else jQuery("#tremail").show();
|
||||
}
|
||||
}
|
||||
initfields();
|
||||
jQuery("#MEMBER_ENABLE_PUBLIC").change(function() { initfields(); });
|
||||
jQuery("#MEMBER_NEWFORM_PAYONLINE").change(function() { initemail(); });
|
||||
})';
|
||||
print '</script>'."\n";
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +138,7 @@ print '<table class="noborder" width="100%">';
|
|||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
|
|
@ -128,14 +147,14 @@ $var=! $var;
|
|||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("EnablePublicSubscriptionForm");
|
||||
print '</td><td width="60" align="right">';
|
||||
print '</td><td align="right">';
|
||||
print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Type
|
||||
/*$var=! $var;
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bcdd[$var].'><td>';
|
||||
print '<tr '.$bc[$var].' class="drag"><td>';
|
||||
print $langs->trans("EnablePublicSubscriptionForm");
|
||||
print '</td><td width="60" align="center">';
|
||||
print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1);
|
||||
|
|
@ -144,32 +163,43 @@ print "</td></tr>\n"; */
|
|||
// Amount
|
||||
$var=! $var;
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bcdd[$var].'><td>';
|
||||
print '<tr '.$bc[$var].' id="tramount"><td>';
|
||||
print $langs->trans("DefaultAmount");
|
||||
print '</td><td width="60" align="right">';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="text" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" size="5" value="'.(! empty($conf->global->MEMBER_NEWFORM_AMOUNT)?$conf->global->MEMBER_NEWFORM_AMOUNT:'').'">';;
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Can edit
|
||||
$var=! $var;
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bcdd[$var].'><td>';
|
||||
print '<tr '.$bc[$var].' id="tredit"><td>';
|
||||
print $langs->trans("CanEditAmount");
|
||||
print '</td><td width="60" align="right">';
|
||||
print '</td><td align="right">';
|
||||
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
{
|
||||
// Jump to an online payment page
|
||||
$var=! $var;
|
||||
print '<tr '.$bc[$var].' id="trpayment"><td>';
|
||||
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
||||
print '</td><td align="right">';
|
||||
$listofval=array();
|
||||
if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox';
|
||||
if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal';
|
||||
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
{
|
||||
// Jump to an online payment page
|
||||
$var=! $var;
|
||||
print '<tr '.$bcdd[$var].'><td>';
|
||||
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
||||
print '</td><td width="60" align="right">';
|
||||
$listofval=array();
|
||||
if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox';
|
||||
if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal';
|
||||
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1);
|
||||
print '<tr '.$bc[$var].' id="tremail"><td>';
|
||||
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
|
||||
print '</td><td align="right">';
|
||||
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';;
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class ActionComm extends CommonObject
|
|||
var $punctual = 1; // Milestone
|
||||
var $percentage; // Percentage
|
||||
var $location; // Location
|
||||
|
||||
var $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events)
|
||||
var $priority; // Free text ('' By default)
|
||||
var $note; // Description
|
||||
|
||||
|
|
@ -121,6 +121,7 @@ class ActionComm extends CommonObject
|
|||
if (empty($this->priority)) $this->priority = 0;
|
||||
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
|
||||
if (empty($this->punctual)) $this->punctual = 0;
|
||||
if (empty($this->transparency)) $this->transparency = 0;
|
||||
if ($this->percentage > 100) $this->percentage = 100;
|
||||
if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||
if (! empty($this->datep) && ! empty($this->datef)) $this->durationp=($this->datef - $this->datep);
|
||||
|
|
@ -178,6 +179,7 @@ class ActionComm extends CommonObject
|
|||
$sql.= "fk_user_action,";
|
||||
$sql.= "fk_user_done,";
|
||||
$sql.= "label,percent,priority,fulldayevent,location,punctual,";
|
||||
$sql.= "transparency,";
|
||||
$sql.= "fk_element,";
|
||||
$sql.= "elementtype,";
|
||||
$sql.= "entity";
|
||||
|
|
@ -196,6 +198,7 @@ class ActionComm extends CommonObject
|
|||
$sql.= (isset($this->usertodo->id) && $this->usertodo->id > 0?"'".$this->usertodo->id."'":"null").",";
|
||||
$sql.= (isset($this->userdone->id) && $this->userdone->id > 0?"'".$this->userdone->id."'":"null").",";
|
||||
$sql.= "'".$this->db->escape($this->label)."','".$this->percentage."','".$this->priority."','".$this->fulldayevent."','".$this->db->escape($this->location)."','".$this->punctual."',";
|
||||
$sql.= "'".$this->transparency."',";
|
||||
$sql.= (! empty($this->fk_element)?$this->fk_element:"null").",";
|
||||
$sql.= (! empty($this->elementtype)?"'".$this->elementtype."'":"null").",";
|
||||
$sql.= $conf->entity;
|
||||
|
|
@ -282,7 +285,7 @@ class ActionComm extends CommonObject
|
|||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.transparency,";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle,";
|
||||
$sql.= " s.nom as socname,";
|
||||
$sql.= " u.firstname, u.lastname as lastname";
|
||||
|
|
@ -331,6 +334,7 @@ class ActionComm extends CommonObject
|
|||
$this->priority = $obj->priority;
|
||||
$this->fulldayevent = $obj->fulldayevent;
|
||||
$this->location = $obj->location;
|
||||
$this->transparency = $obj->transparency;
|
||||
|
||||
$this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
|
||||
$this->societe->id = $obj->fk_soc;
|
||||
|
|
@ -437,6 +441,7 @@ class ActionComm extends CommonObject
|
|||
$this->note=trim($this->note);
|
||||
if (empty($this->percentage)) $this->percentage = 0;
|
||||
if (empty($this->priority)) $this->priority = 0;
|
||||
if (empty($this->transparency)) $this->transparency = 0;
|
||||
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
|
||||
if ($this->percentage > 100) $this->percentage = 100;
|
||||
if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||
|
|
@ -471,6 +476,7 @@ class ActionComm extends CommonObject
|
|||
$sql.= ", priority = '".$this->priority."'";
|
||||
$sql.= ", fulldayevent = '".$this->fulldayevent."'";
|
||||
$sql.= ", location = ".($this->location ? "'".$this->db->escape($this->location)."'":"null");
|
||||
$sql.= ", transparency = '".$this->transparency."'";
|
||||
$sql.= ", fk_user_mod = '".$user->id."'";
|
||||
$sql.= ", fk_user_action=".($this->usertodo->id > 0 ? "'".$this->usertodo->id."'":"null");
|
||||
$sql.= ", fk_user_done=".($this->userdone->id > 0 ? "'".$this->userdone->id."'":"null");
|
||||
|
|
@ -952,7 +958,7 @@ class ActionComm extends CommonObject
|
|||
$event['priority']=$obj->priority;
|
||||
$event['fulldayevent']=$obj->fulldayevent;
|
||||
$event['location']=$obj->location;
|
||||
$event['transparency']='TRANSPARENT'; // OPAQUE (busy) or TRANSPARENT (not busy)
|
||||
$event['transparency']=(($obj->transparency > 0)?'OPAQUE':'TRANSPARENT'); // OPAQUE (busy) or TRANSPARENT (not busy)
|
||||
$event['category']=$obj->libelle; // libelle type action
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
||||
|
|
@ -1058,6 +1064,7 @@ class ActionComm extends CommonObject
|
|||
$this->punctual=0;
|
||||
$this->percentage=0;
|
||||
$this->location='Location';
|
||||
$this->transparency=0;
|
||||
$this->priority='Priority X';
|
||||
$this->note = 'Note';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ if ($action == 'add_action')
|
|||
$actioncomm->priority = GETPOST("priority")?GETPOST("priority"):0;
|
||||
$actioncomm->fulldayevent = (! empty($fulldayevent)?1:0);
|
||||
$actioncomm->location = GETPOST("location");
|
||||
$actioncomm->transparency = (GETPOST("transparency")=='on'?1:0);
|
||||
$actioncomm->label = trim(GETPOST('label'));
|
||||
if (! GETPOST('label'))
|
||||
{
|
||||
|
|
@ -313,7 +314,7 @@ if ($action == 'update')
|
|||
$actioncomm->percentage = $percentage;
|
||||
$actioncomm->priority = $_POST["priority"];
|
||||
$actioncomm->fulldayevent= $_POST["fullday"]?1:0;
|
||||
$actioncomm->location = isset($_POST["location"])?$_POST["location"]:'';
|
||||
$actioncomm->location = GETPOST('location');
|
||||
$actioncomm->societe->id = $_POST["socid"];
|
||||
$actioncomm->contact->id = $_POST["contactid"];
|
||||
$actioncomm->fk_project = $_POST["projectid"];
|
||||
|
|
@ -333,6 +334,8 @@ if ($action == 'update')
|
|||
$usertodo->fetch($_POST["affectedto"]);
|
||||
}
|
||||
$actioncomm->usertodo = $usertodo;
|
||||
$actioncomm->transparency=(GETPOST("transparency")=='on'?1:0);
|
||||
|
||||
$userdone=new User($db);
|
||||
if ($_POST["doneby"])
|
||||
{
|
||||
|
|
@ -509,16 +512,24 @@ if ($action == 'create')
|
|||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Affected by
|
||||
// Assigned to
|
||||
$var=false;
|
||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
||||
$form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($actioncomm->usertodo->id) && $actioncomm->usertodo->id > 0 ? $actioncomm->usertodo->id : $user->id),'affectedto',1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Busy
|
||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("Busy").'</td><td>';
|
||||
print '<input id="transparency" type="checkbox" name="transparency" value="'.$actioncomm->transparency.'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Realised by
|
||||
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||
$form->select_users(GETPOST("doneby")?GETPOST("doneby"):(! empty($actioncomm->userdone->id) && $percent==100?$actioncomm->userdone->id:0),'doneby',1);
|
||||
print '</td></tr>';
|
||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
||||
{
|
||||
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||
$form->select_users(GETPOST("doneby")?GETPOST("doneby"):(! empty($actioncomm->userdone->id) && $percent==100?$actioncomm->userdone->id:0),'doneby',1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '<br><br>';
|
||||
|
|
@ -745,21 +756,23 @@ if ($id > 0)
|
|||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
// Input by
|
||||
$var=false;
|
||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAskedBy").'</td><td colspan="3">';
|
||||
print $act->author->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Affected to
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||
// Assigned to
|
||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||
print $form->select_dolusers($act->usertodo->id>0?$act->usertodo->id:-1,'affectedto',1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Busy
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("Busy").'</td><td>';
|
||||
print '<input id="transparency" type="checkbox" name="transparency"'.($act->transparency?' checked="checked"':'').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Realised by
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||
print $form->select_dolusers($act->userdone->id> 0?$act->userdone->id:-1,'doneby',1);
|
||||
print '</td></tr>';
|
||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
||||
{
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||
print $form->select_dolusers($act->userdone->id> 0?$act->userdone->id:-1,'doneby',1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table><br><br>';
|
||||
|
||||
|
|
@ -909,23 +922,24 @@ if ($id > 0)
|
|||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
// Input by
|
||||
$var=false;
|
||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAskedBy").'</td><td colspan="3">';
|
||||
if ($act->author->id > 0) print $act->author->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
// Affecte a
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||
// Assigned to
|
||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||
if ($act->usertodo->id > 0) print $act->usertodo->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Done by
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||
if ($act->userdone->id > 0) print $act->userdone->getNomUrl(1);
|
||||
// Busy
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("Busy").'</td><td colspan="3">';
|
||||
print yn(($act->transparency > 0)?1:0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Done by
|
||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
||||
{
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||
if ($act->userdone->id > 0) print $act->userdone->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
|
||||
// Third party - Contact
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class Contact extends CommonObject
|
|||
var $user_login;
|
||||
var $import_key;
|
||||
|
||||
var $oldcopy; // To contains a clone of this when we need to save old properties of object
|
||||
var $oldcopy; // To contains a clone of this when we need to save old properties of object
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -1037,6 +1037,11 @@ class Contact extends CommonObject
|
|||
$this->country = 'France';
|
||||
$this->email = 'specimen@specimen.com';
|
||||
|
||||
$this->phone_pro = '0909090901';
|
||||
$this->phone_perso = '0909090902';
|
||||
$this->phone_mobile = '0909090903';
|
||||
$this->fax = '0909090909';
|
||||
|
||||
$this->note_public='This is a comment (public)';
|
||||
$this->note='This is a comment (private)';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -86,7 +86,7 @@ class box_factures_fourn extends ModeleBoxes
|
|||
$now=dol_now();
|
||||
|
||||
$i = 0;
|
||||
$l_due_date = $langs->trans('Late').' ('.strtolower($langs->trans('DateEcheance')).': %s)';
|
||||
$l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)';
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
|
|
@ -95,7 +95,7 @@ class box_factures_fourn extends ModeleBoxes
|
|||
$datec=$db->jdate($objp->datec);
|
||||
|
||||
$late = '';
|
||||
if ($objp->paye == 0 && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day')));
|
||||
if ($objp->paye == 0 && $datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day')));
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
|
|
|
|||
|
|
@ -3478,7 +3478,7 @@ class Form
|
|||
// If reset_scripts is not empty, print the button with the reset_scripts in OnClick
|
||||
if ($reset_scripts)
|
||||
{
|
||||
$retstring.='<button class="dpInvisibleButtons datenowlink" id="'.$prefix.'ButtonNow" type="button" name="_useless" value="Now" onClick="'.$reset_scripts.'">';
|
||||
$retstring.=' <button class="dpInvisibleButtons datenowlink" id="'.$prefix.'ButtonNow" type="button" name="_useless" value="Now" onClick="'.$reset_scripts.'">';
|
||||
$retstring.=$langs->trans("Now");
|
||||
$retstring.='</button> ';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ elseif ($action == 'setdate_lim_reglement' && $user->rights->fournisseur->factur
|
|||
{
|
||||
$object->fetch($id);
|
||||
$object->date_echeance=dol_mktime(12,0,0,$_POST['date_lim_reglementmonth'],$_POST['date_lim_reglementday'],$_POST['date_lim_reglementyear']);
|
||||
if ($object->date_echeance < $object->date)
|
||||
if (! empty($object->date_echeance) && $object->date_echeance < $object->date)
|
||||
{
|
||||
$object->date_echeance=$object->date;
|
||||
setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"),'warnings');
|
||||
|
|
|
|||
|
|
@ -207,12 +207,12 @@ insert into llx_c_pays (rowid,code,libelle) values (172, 'MP', 'Mariannes du Nor
|
|||
insert into llx_c_pays (rowid,code,libelle) values (173, 'NO', 'Norvège' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (174, 'OM', 'Oman' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (175, 'PK', 'Pakistan' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (176, 'PW', 'Palaos' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (176, 'PW', 'Palaos' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (177, 'PS', 'Territoire Palestinien Occupé');
|
||||
insert into llx_c_pays (rowid,code,libelle) values (178, 'PA', 'Panama' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (179, 'PG', 'Papouasie-Nouvelle-Guinée');
|
||||
insert into llx_c_pays (rowid,code,libelle) values (180, 'PY', 'Paraguay' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (181, 'PE', 'Pérou' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (181, 'PE', 'Peru' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (182, 'PH', 'Philippines' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (183, 'PN', 'Iles Pitcairn' );
|
||||
insert into llx_c_pays (rowid,code,libelle) values (184, 'PL', 'Pologne' );
|
||||
|
|
|
|||
|
|
@ -165,6 +165,10 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (17
|
|||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1733, 173, '8','0','VAT reduced rate', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1734, 173, '0','0','VAT Rate 0', 1);
|
||||
|
||||
-- PERU (id country=181)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1841, 181, '18','0','VAT standard rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1843, 181, '0','0','VAT Rate 0',1);
|
||||
|
||||
-- POLAND (id country=184)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1841, 184, '20','0','VAT standard rate',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1842, 184, '7','0','VAT reduced rate',1);
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ CREATE TABLE llx_printer_ipp
|
|||
printer_uri varchar(256) NOT NULL,
|
||||
copy int(11) NOT NULL DEFAULT '1',
|
||||
module varchar(16) NOT NULL,
|
||||
login varchar(32) NOT NULL,
|
||||
login varchar(32) NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_socpeople ADD COLUMN ref_ext varchar(128) after entity;
|
||||
|
|
@ -236,4 +236,4 @@ ALTER TABLE llx_commande_extrafields ADD INDEX idx_commande_extrafields (fk_obje
|
|||
ALTER TABLE llx_socpeople ADD COLUMN note_public text after note;
|
||||
ALTER TABLE llx_societe ADD COLUMN note_public text after note;
|
||||
|
||||
>>>>>>> refs/heads/develop
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN transparency integer after fk_user_action;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ create table llx_actioncomm
|
|||
fk_parent integer NOT NULL default 0,
|
||||
|
||||
fk_user_action integer, -- id de la personne qui doit effectuer l'action
|
||||
transparency integer, -- transparency (ical standard). used to say if people assigned to event are busy or not by event.
|
||||
fk_user_done integer, -- id de la personne qui a effectue l'action
|
||||
priority smallint,
|
||||
fulldayevent smallint NOT NULL default 0,
|
||||
|
|
|
|||
|
|
@ -378,12 +378,12 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
|
|||
$modulesfile = array();
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$handlemodule=@opendir($dirroot);
|
||||
$handlemodule=@opendir($dirroot); // $dirroot may be '..'
|
||||
if (is_resource($handlemodule))
|
||||
{
|
||||
while (($filemodule = readdir($handlemodule))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$filemodule.'/sql'))
|
||||
if (! preg_match('/\./',$filemodule) && is_dir($dirroot.'/'.$filemodule.'/sql')) // We exclude filemodule that contains . (are not directories) and are not directories.
|
||||
{
|
||||
//print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file;
|
||||
if (is_file($dirroot . '/' . $filemodule . '/sql/'.$file))
|
||||
|
|
|
|||
|
|
@ -202,3 +202,4 @@ MembersStatisticsByProperties=Members statistics by characteristics
|
|||
MembersByNature=Members by nature
|
||||
VATToUseForSubscriptions=VAT rate to use for subscriptions
|
||||
NoVatOnSubscription=No TVA for subscriptions
|
||||
MEMBER_PAYONLINE_SENDEMAIL=Email to warn when Dolibarr receive a confirmation of a validated payment for subscription
|
||||
|
|
|
|||
13
htdocs/langs/es_PE/admin.lang
Normal file
13
htdocs/langs/es_PE/admin.lang
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Dolibarr language file - es_PU - admin
|
||||
CHARSET=UTF-8
|
||||
Permission91=Consultar impuestos e IGV
|
||||
Permission92=Crear/modificar impuestos e IGV
|
||||
Permission93=Eliminar impuestos e IGV
|
||||
DictionnaryVAT=Tasa de IGV (Impuesto sobre ventas en EEUU)
|
||||
VATManagement=Gestión IGV
|
||||
VATIsUsedDesc=El tipo de IGV propuesto por defecto en las creaciones de presupuestos, facturas, pedidos, etc. Responde a la siguiente regla:<br>Si el vendedor no está sujeto a IVU, IVU por defecto=0. Final de regla.<br>Si el país del vendedor= país del comprador entonces IVU por defecto=IVU del producto vendido. Final de regla.<br>Si vendedor y comprador residen en la Comunidad Europea y el bien vendido= nuevo medio de transportes (auto, barco, avión), IVU por defecto=0 (el IVU debe ser pagado por comprador a la hacienda pública de su país y no al vendedor). Final de regla<br>Si vendedor y comprador residen en la Comunidad Europea y comprador= particular o empresa sin NIF intracomunitario entonces IVU por defecto=IVU del producto vendido. Final de regla.<br>Si vendedor y comprador residen en la Comunidad Europea y comprador= empresa con NIF intracomunitario entonces IVU por defecto=0. Final de regla.<br>Si no, IVU propuesto por defecto=0. Final de regla.<br>
|
||||
VATIsNotUsedDesc=El tipo de IGV propuesto por defecto es 0. Este es el caso de asociaciones, particulares o algunas pequeñas sociedades.
|
||||
UnitPriceOfProduct=Precio unitario sin IGV de un producto
|
||||
OptionVatMode=Opción de carga de IGV
|
||||
OptionVatDefaultDesc=La carga del IGV 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 IGV 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
|
||||
10
htdocs/langs/es_PE/bills.lang
Normal file
10
htdocs/langs/es_PE/bills.lang
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Dolibarr language file - es_PU - bills
|
||||
CHARSET=UTF-8
|
||||
ErrorVATIntraNotConfigured=Número de IGV intracomunitario aún no configurado
|
||||
ConfirmClassifyPaidPartiallyReasonDiscountNoVat=El resto a pagar <b>(%s %s)</b> es un descuento acordado después de la factura. Acepto perder el IGV de este descuento
|
||||
AmountOfBillsByMonthHT=Importe de las facturas por mes (Sin IGV)
|
||||
IntracommunityVATNumber=Número de IGV intracomunitario
|
||||
VATIsNotUsedForInvoice=* IGV no aplicable art-293B del CGI
|
||||
PDFBerniqueDescription=Modelo para las facturas con varios tipos de IGV, incluido también el número de IGV Intracomunitario
|
||||
PDFCrabeDescription=Modelo de factura completo (IGV, método de pago a mostrar, logotipo...)
|
||||
PDFOursinDescription=Modelo de factura completo (IGV, métodos de pago, entregas, nombre del proyecto, referencias de presupuesto, logotipo...)
|
||||
4
htdocs/langs/es_PE/companies.lang
Normal file
4
htdocs/langs/es_PE/companies.lang
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Dolibarr language file - es_PU - companies
|
||||
CHARSET=UTF-8
|
||||
VATIsUsed=Sujeto a IGV
|
||||
VATIsNotUsed=No sujeto a IGV
|
||||
26
htdocs/langs/es_PE/compta.lang
Normal file
26
htdocs/langs/es_PE/compta.lang
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Dolibarr language file - es_PU - compta
|
||||
CHARSET=UTF-8
|
||||
VATToPay=IGV ventas
|
||||
VATReceived=IGV repercutido
|
||||
VATToCollect=IGV compras
|
||||
VATSummary=Balance de IGV
|
||||
VATPaid=IGV Pagado
|
||||
VATCollected=IGV recuperado
|
||||
PaymentVat=Pago IGV
|
||||
NewVATPayment=Nuevo pago de IGV
|
||||
VATPayment=Pago IGV
|
||||
VATPayments=Pagos IGV
|
||||
SocialContributionsPayments=Pagos cargas sociales
|
||||
ShowVatPayment=Ver pagos IGV
|
||||
TotalVATReceived=Total IGV percibido
|
||||
RulesResultDue=- Los importes mostrados son importes totales<br>- Incluye las facturas, cargas e IGV debidos, que estén pagadas o no.<br>- Se basa en la fecha de validación para las facturas y el IGV 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 IGV.<br>- Se basa en la fecha de pago de las mismas.<br>
|
||||
VATReportByCustomersInInputOutputMode=Informe por cliente del IGV repercutido y pagado (IGV pagado)
|
||||
VATReportByCustomersInDueDebtMode=Informe por cliente del IGV repercutido y pagado (IGV debido)
|
||||
VATReportByQuartersInInputOutputMode=Informe por tasa del IGV repercutido y pagado (IGV pagado)
|
||||
VATReportByQuartersInDueDebtMode=Informe por tasa del IGV repercutido y pagado (IGV debido)
|
||||
SeeVATReportInInputOutputMode=Ver el informe <b>%sIGV pagado%s</b> para un modo de cálculo estandard
|
||||
SeeVATReportInDueDebtMode=Ver el informe <b>%sIGV debido%s</b> para un modo de cálculo con la opción sobre lo debido
|
||||
RulesVATIn=- Para los servicios, el informe incluye el IGV de los pagos efectivamente recibidos o emitidos basándose en la fecha del pago.<br>- Para los bienes materiales, incluye el IGV de las facturas basándose en la fecha de la factura.
|
||||
RulesVATDue=- Para los servicios, el informe incluye el IGV de las facturas debidas, pagadas o no basándose en la fecha de estas facturas.<br>- Para los bienes materiales, incluye el IGV de las facturas basándose en la fecha de la factura.
|
||||
COMPTA_VAT_ACCOUNT=Código contable por defecto para el IGV (si no está definido en el diccionario "Tasas de IGV")
|
||||
10
htdocs/langs/es_PE/main.lang
Normal file
10
htdocs/langs/es_PE/main.lang
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Dolibarr language file - es_PU - main
|
||||
CHARSET=UTF-8
|
||||
DIRECTION=ltr
|
||||
AmountVAT=Importe IGV
|
||||
TotalVAT=Total IGV
|
||||
IncludedVAT=IGV incluido
|
||||
HT=Sin IGV
|
||||
TTC=IGV incluido
|
||||
VAT=IGV
|
||||
VATRate=Tasa IGV
|
||||
3
htdocs/langs/es_PE/propal.lang
Normal file
3
htdocs/langs/es_PE/propal.lang
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Dolibarr language file - es_PU - propal
|
||||
CHARSET=UTF-8
|
||||
AmountOfProposalsByMonthHT=Importe por mes (Sin IGV)
|
||||
|
|
@ -207,4 +207,4 @@ MembersStatisticsByProperties=Statistiques des adhérents par caractéristiques
|
|||
MembersByNature=Adhérents par nature
|
||||
VATToUseForSubscriptions=Taux de TVA pour les adhésions
|
||||
NoVatOnSubscription=Pas de TVA sur les adhésions
|
||||
|
||||
MEMBER_PAYONLINE_SENDEMAIL=Email à avertir en cas de retour de paiement validé pour une cotisation
|
||||
|
|
|
|||
|
|
@ -62,6 +62,32 @@ $tracepost = "";
|
|||
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox');
|
||||
|
||||
|
||||
// Send an email
|
||||
if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=',$fulltag))
|
||||
{
|
||||
$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL;
|
||||
$from=$conf->global->MAILING_EMAIL_FROM;
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mailfile = new CMailFile(
|
||||
'New subscription payed',
|
||||
$sendto,
|
||||
$from,
|
||||
'New subscription payed '.$fulltag
|
||||
);
|
||||
|
||||
$result=$mailfile->sendfile();
|
||||
if ($result)
|
||||
{
|
||||
dol_syslog("EMail sent to ".$sendto);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
llxHeaderPayBox($langs->trans("PaymentForm"));
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,15 @@ $langs->load("companies");
|
|||
$langs->load("paybox");
|
||||
$langs->load("paypal");
|
||||
|
||||
/*$source=GETPOST('source');
|
||||
$ref=GETPOST('ref');
|
||||
$PAYBOXTOKEN=GETPOST('TOKEN');
|
||||
if (empty($PAYBOXTOKEN)) $PAYBOXTOKEN=GETPOST('token');
|
||||
$PAYBOXPAYERID=GETPOST('PAYERID');
|
||||
if (empty($PAYBOXPAYERID)) $PAYBOXPAYERID=GETPOST('PayerID');
|
||||
*/
|
||||
$PAYBOXFULLTAG=GETPOST('FULLTAG');
|
||||
if (empty($PAYBOXFULLTAG)) $PAYBOXFULLTAG=GETPOST('fulltag');
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -68,6 +77,47 @@ llxHeaderPayBox($langs->trans("PaymentForm"));
|
|||
print '<span id="dolpaymentspan"></span>'."\n";
|
||||
print '<div id="dolpaymentdiv" align="center">'."\n";
|
||||
|
||||
// Get on url call
|
||||
/*
|
||||
$token = $PAYBOXTOKEN;
|
||||
*/
|
||||
$fulltag = $PAYBOXFULLTAG;
|
||||
/*$payerID = $PAYBOXPAYERID;
|
||||
// Set by newpayment.php
|
||||
$paymentType = $_SESSION['PaymentType'];
|
||||
$currencyCodeType = $_SESSION['currencyCodeType'];
|
||||
$FinalPaymentAmt = $_SESSION["Payment_Amount"];
|
||||
// From env
|
||||
$ipaddress = $_SESSION['ipaddress'];
|
||||
|
||||
dol_syslog("Call newpaymentok with token=".$token." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag);
|
||||
*/
|
||||
|
||||
// Send an email
|
||||
if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=',$fulltag))
|
||||
{
|
||||
$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL;
|
||||
$from=$conf->global->MAILING_EMAIL_FROM;
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mailfile = new CMailFile(
|
||||
'New subscription payed',
|
||||
$sendto,
|
||||
$from,
|
||||
'New subscription payed '.$fulltag
|
||||
);
|
||||
|
||||
$result=$mailfile->sendfile();
|
||||
if ($result)
|
||||
{
|
||||
dol_syslog("EMail sent to ".$sendto);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n";
|
||||
|
||||
if (! empty($conf->global->PAYBOX_MESSAGE_OK)) print $conf->global->PAYBOX_MESSAGE_OK;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,31 @@ foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
|||
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal');
|
||||
|
||||
|
||||
// Send an email
|
||||
if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=',$fulltag))
|
||||
{
|
||||
$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL;
|
||||
$from=$conf->global->MAILING_EMAIL_FROM;
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mailfile = new CMailFile(
|
||||
'New subscription payed',
|
||||
$sendto,
|
||||
$from,
|
||||
'New subscription payed '.$fulltag
|
||||
);
|
||||
|
||||
$result=$mailfile->sendfile();
|
||||
if ($result)
|
||||
{
|
||||
dol_syslog("EMail sent to ".$sendto);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
llxHeaderPaypal($langs->trans("PaymentForm"));
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,15 @@ if (empty($PAYPAL_API_SIGNATURE))
|
|||
return -1;
|
||||
}
|
||||
|
||||
$source=GETPOST('source');
|
||||
$ref=GETPOST('ref');
|
||||
$PAYPALTOKEN=GETPOST('TOKEN');
|
||||
if (empty($PAYPALTOKEN)) $PAYPALTOKEN=GETPOST('token');
|
||||
$PAYPALPAYERID=GETPOST('PAYERID');
|
||||
if (empty($PAYPALPAYERID)) $PAYPALPAYERID=GETPOST('PayerID');
|
||||
$PAYPALFULLTAG=GETPOST('FULLTAG');
|
||||
if (empty($PAYPALFULLTAG)) $PAYPALFULLTAG=GETPOST('fulltag');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -105,15 +114,6 @@ llxHeaderPaypal($langs->trans("PaymentForm"));
|
|||
print '<span id="dolpaymentspan"></span>'."\n";
|
||||
print '<div id="dolpaymentdiv" align="center">'."\n";
|
||||
|
||||
$source=GETPOST('source');
|
||||
$ref=GETPOST('ref');
|
||||
$PAYPALTOKEN=GETPOST('TOKEN');
|
||||
if (empty($PAYPALTOKEN)) $PAYPALTOKEN=GETPOST('token');
|
||||
$PAYPALPAYERID=GETPOST('PAYERID');
|
||||
if (empty($PAYPALPAYERID)) $PAYPALPAYERID=GETPOST('PayerID');
|
||||
$PAYPALFULLTAG=GETPOST('FULLTAG');
|
||||
if (empty($PAYPALFULLTAG)) $PAYPALFULLTAG=GETPOST('fulltag');
|
||||
|
||||
if ($PAYPALTOKEN)
|
||||
{
|
||||
// Get on url call
|
||||
|
|
@ -129,6 +129,33 @@ if ($PAYPALTOKEN)
|
|||
|
||||
dol_syslog("Call newpaymentok with token=".$token." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag);
|
||||
|
||||
|
||||
// Send an email
|
||||
if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=',$fulltag))
|
||||
{
|
||||
$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL;
|
||||
$from=$conf->global->MAILING_EMAIL_FROM;
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mailfile = new CMailFile(
|
||||
'New subscription payed',
|
||||
$sendto,
|
||||
$from,
|
||||
'New subscription payed '.$fulltag
|
||||
);
|
||||
|
||||
$result=$mailfile->sendfile();
|
||||
if ($result)
|
||||
{
|
||||
dol_syslog("EMail sent to ".$sendto);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Validate record
|
||||
if (! empty($paymentType))
|
||||
{
|
||||
dol_syslog("We call GetExpressCheckoutDetails");
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ class Societe extends CommonObject
|
|||
|
||||
var $array_options;
|
||||
|
||||
var $oldcopy;
|
||||
var $oldcopy; // To contains a clone of this when we need to save old properties of object
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -251,7 +251,7 @@ class Societe extends CommonObject
|
|||
// Fin appel triggers
|
||||
}
|
||||
else $error++;
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
dol_syslog(get_class($this)."::Create success id=".$this->id);
|
||||
|
|
@ -2585,6 +2585,9 @@ class Societe extends CommonObject
|
|||
$this->email='specimen@specimen.com';
|
||||
$this->url='http://www.specimen.com';
|
||||
|
||||
$this->phone='0909090901';
|
||||
$this->fax='0909090909';
|
||||
|
||||
$this->code_client='CC-'.dol_print_date($now,'dayhourlog');
|
||||
$this->code_fournisseur='SC-'.dol_print_date($now,'dayhourlog');
|
||||
$this->capital=10000;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user