develop_orderextrafield

Conflicts:
	htdocs/install/mysql/migration/3.3.0-3.4.0.sql

Change-Id: I91fe24831dca9e1d9e6b09f85dd4b7bd37bd638e
This commit is contained in:
fhenry 2013-04-07 15:11:52 +02:00
commit 0427080a4e
26 changed files with 339 additions and 79 deletions

View File

@ -29,6 +29,7 @@ For users:
and a delay. and a delay.
- New: Can define a different clicktodial setup per user. - New: Can define a different clicktodial setup per user.
- New: Add option INVOICE_CAN_NEVER_BE_REMOVED. - 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. - First change to prepare feature click to print for PDF.
For translators: For translators:

View File

@ -48,11 +48,13 @@ if ($action == 'update')
$amount=GETPOST('MEMBER_NEWFORM_AMOUNT'); $amount=GETPOST('MEMBER_NEWFORM_AMOUNT');
$editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT'); $editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
$payonline=GETPOST('MEMBER_NEWFORM_PAYONLINE'); $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_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_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_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_NEWFORM_PAYONLINE",$payonline,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_PAYONLINE_SENDEMAIL",$email,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;
@ -90,22 +92,39 @@ if ($conf->use_javascript_ajax)
{ {
print "\n".'<script type="text/javascript" language="javascript">'; print "\n".'<script type="text/javascript" language="javascript">';
print 'jQuery(document).ready(function () { print 'jQuery(document).ready(function () {
function initemail()
{
if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\')
{
jQuery("#tremail").hide();
}
else
{
jQuery("#tremail").show();
}
}
function initfields() 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\') if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'1\')
{ {
jQuery(".drag").show(); jQuery("#tramount").show();
} jQuery("#tredit").show();
} jQuery("#trpayment").show();
initfields(); if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\') jQuery("#tremail").hide();
jQuery("#MEMBER_ENABLE_PUBLIC").change(function() { else jQuery("#tremail").show();
initfields(); }
}); }
})'; initfields();
jQuery("#MEMBER_ENABLE_PUBLIC").change(function() { initfields(); });
jQuery("#MEMBER_NEWFORM_PAYONLINE").change(function() { initemail(); });
})';
print '</script>'."\n"; print '</script>'."\n";
} }
@ -119,7 +138,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>'; 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"; print "</tr>\n";
$var=true; $var=true;
@ -128,14 +147,14 @@ $var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
print $langs->trans("EnablePublicSubscriptionForm"); 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 $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1);
print "</td></tr>\n"; print "</td></tr>\n";
// Type // Type
/*$var=! $var; /*$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; 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 $langs->trans("EnablePublicSubscriptionForm");
print '</td><td width="60" align="center">'; print '</td><td width="60" align="center">';
print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1);
@ -144,32 +163,43 @@ print "</td></tr>\n"; */
// Amount // Amount
$var=! $var; $var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; 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 $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 '<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"; print "</td></tr>\n";
// Can edit // Can edit
$var=! $var; $var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; 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 $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 $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1);
print "</td></tr>\n"; 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)) if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
{ {
// Jump to an online payment page // Jump to an online payment page
$var=! $var; $var=! $var;
print '<tr '.$bcdd[$var].'><td>'; print '<tr '.$bc[$var].' id="tremail"><td>';
print $langs->trans("MEMBER_NEWFORM_PAYONLINE"); print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
print '</td><td width="60" align="right">'; print '</td><td align="right">';
$listofval=array(); 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:'').'">';;
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"; print "</td></tr>\n";
} }

View File

@ -59,7 +59,7 @@ class ActionComm extends CommonObject
var $punctual = 1; // Milestone var $punctual = 1; // Milestone
var $percentage; // Percentage var $percentage; // Percentage
var $location; // Location 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 $priority; // Free text ('' By default)
var $note; // Description var $note; // Description
@ -121,6 +121,7 @@ class ActionComm extends CommonObject
if (empty($this->priority)) $this->priority = 0; if (empty($this->priority)) $this->priority = 0;
if (empty($this->fulldayevent)) $this->fulldayevent = 0; if (empty($this->fulldayevent)) $this->fulldayevent = 0;
if (empty($this->punctual)) $this->punctual = 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->percentage = 100;
if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date; if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
if (! empty($this->datep) && ! empty($this->datef)) $this->durationp=($this->datef - $this->datep); 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_action,";
$sql.= "fk_user_done,"; $sql.= "fk_user_done,";
$sql.= "label,percent,priority,fulldayevent,location,punctual,"; $sql.= "label,percent,priority,fulldayevent,location,punctual,";
$sql.= "transparency,";
$sql.= "fk_element,"; $sql.= "fk_element,";
$sql.= "elementtype,"; $sql.= "elementtype,";
$sql.= "entity"; $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->usertodo->id) && $this->usertodo->id > 0?"'".$this->usertodo->id."'":"null").",";
$sql.= (isset($this->userdone->id) && $this->userdone->id > 0?"'".$this->userdone->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->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->fk_element)?$this->fk_element:"null").",";
$sql.= (! empty($this->elementtype)?"'".$this->elementtype."'":"null").","; $sql.= (! empty($this->elementtype)?"'".$this->elementtype."'":"null").",";
$sql.= $conf->entity; $sql.= $conf->entity;
@ -282,7 +285,7 @@ class ActionComm extends CommonObject
$sql.= " a.fk_user_action, a.fk_user_done,"; $sql.= " a.fk_user_action, a.fk_user_done,";
$sql.= " a.fk_contact, a.percent as percentage,"; $sql.= " a.fk_contact, a.percent as percentage,";
$sql.= " a.fk_element, a.elementtype,"; $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.= " c.id as type_id, c.code as type_code, c.libelle,";
$sql.= " s.nom as socname,"; $sql.= " s.nom as socname,";
$sql.= " u.firstname, u.lastname as lastname"; $sql.= " u.firstname, u.lastname as lastname";
@ -331,6 +334,7 @@ class ActionComm extends CommonObject
$this->priority = $obj->priority; $this->priority = $obj->priority;
$this->fulldayevent = $obj->fulldayevent; $this->fulldayevent = $obj->fulldayevent;
$this->location = $obj->location; $this->location = $obj->location;
$this->transparency = $obj->transparency;
$this->socid = $obj->fk_soc; // To have fetch_thirdparty method working $this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
$this->societe->id = $obj->fk_soc; $this->societe->id = $obj->fk_soc;
@ -437,6 +441,7 @@ class ActionComm extends CommonObject
$this->note=trim($this->note); $this->note=trim($this->note);
if (empty($this->percentage)) $this->percentage = 0; if (empty($this->percentage)) $this->percentage = 0;
if (empty($this->priority)) $this->priority = 0; if (empty($this->priority)) $this->priority = 0;
if (empty($this->transparency)) $this->transparency = 0;
if (empty($this->fulldayevent)) $this->fulldayevent = 0; if (empty($this->fulldayevent)) $this->fulldayevent = 0;
if ($this->percentage > 100) $this->percentage = 100; if ($this->percentage > 100) $this->percentage = 100;
if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date; if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
@ -471,6 +476,7 @@ class ActionComm extends CommonObject
$sql.= ", priority = '".$this->priority."'"; $sql.= ", priority = '".$this->priority."'";
$sql.= ", fulldayevent = '".$this->fulldayevent."'"; $sql.= ", fulldayevent = '".$this->fulldayevent."'";
$sql.= ", location = ".($this->location ? "'".$this->db->escape($this->location)."'":"null"); $sql.= ", location = ".($this->location ? "'".$this->db->escape($this->location)."'":"null");
$sql.= ", transparency = '".$this->transparency."'";
$sql.= ", fk_user_mod = '".$user->id."'"; $sql.= ", fk_user_mod = '".$user->id."'";
$sql.= ", fk_user_action=".($this->usertodo->id > 0 ? "'".$this->usertodo->id."'":"null"); $sql.= ", fk_user_action=".($this->usertodo->id > 0 ? "'".$this->usertodo->id."'":"null");
$sql.= ", fk_user_done=".($this->userdone->id > 0 ? "'".$this->userdone->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['priority']=$obj->priority;
$event['fulldayevent']=$obj->fulldayevent; $event['fulldayevent']=$obj->fulldayevent;
$event['location']=$obj->location; $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 $event['category']=$obj->libelle; // libelle type action
// Define $urlwithroot // Define $urlwithroot
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); $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->punctual=0;
$this->percentage=0; $this->percentage=0;
$this->location='Location'; $this->location='Location';
$this->transparency=0;
$this->priority='Priority X'; $this->priority='Priority X';
$this->note = 'Note'; $this->note = 'Note';
} }

View File

@ -136,6 +136,7 @@ if ($action == 'add_action')
$actioncomm->priority = GETPOST("priority")?GETPOST("priority"):0; $actioncomm->priority = GETPOST("priority")?GETPOST("priority"):0;
$actioncomm->fulldayevent = (! empty($fulldayevent)?1:0); $actioncomm->fulldayevent = (! empty($fulldayevent)?1:0);
$actioncomm->location = GETPOST("location"); $actioncomm->location = GETPOST("location");
$actioncomm->transparency = (GETPOST("transparency")=='on'?1:0);
$actioncomm->label = trim(GETPOST('label')); $actioncomm->label = trim(GETPOST('label'));
if (! GETPOST('label')) if (! GETPOST('label'))
{ {
@ -313,7 +314,7 @@ if ($action == 'update')
$actioncomm->percentage = $percentage; $actioncomm->percentage = $percentage;
$actioncomm->priority = $_POST["priority"]; $actioncomm->priority = $_POST["priority"];
$actioncomm->fulldayevent= $_POST["fullday"]?1:0; $actioncomm->fulldayevent= $_POST["fullday"]?1:0;
$actioncomm->location = isset($_POST["location"])?$_POST["location"]:''; $actioncomm->location = GETPOST('location');
$actioncomm->societe->id = $_POST["socid"]; $actioncomm->societe->id = $_POST["socid"];
$actioncomm->contact->id = $_POST["contactid"]; $actioncomm->contact->id = $_POST["contactid"];
$actioncomm->fk_project = $_POST["projectid"]; $actioncomm->fk_project = $_POST["projectid"];
@ -333,6 +334,8 @@ if ($action == 'update')
$usertodo->fetch($_POST["affectedto"]); $usertodo->fetch($_POST["affectedto"]);
} }
$actioncomm->usertodo = $usertodo; $actioncomm->usertodo = $usertodo;
$actioncomm->transparency=(GETPOST("transparency")=='on'?1:0);
$userdone=new User($db); $userdone=new User($db);
if ($_POST["doneby"]) if ($_POST["doneby"])
{ {
@ -509,16 +512,24 @@ if ($action == 'create')
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Affected by // Assigned to
$var=false; $var=false;
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>'; 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); $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>'; 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 // Realised by
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td>'; if ($conf->global->AGENDA_ENABLE_DONEBY)
$form->select_users(GETPOST("doneby")?GETPOST("doneby"):(! empty($actioncomm->userdone->id) && $percent==100?$actioncomm->userdone->id:0),'doneby',1); {
print '</td></tr>'; 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 '</table>';
print '<br><br>'; print '<br><br>';
@ -745,21 +756,23 @@ if ($id > 0)
print '</table><br><br><table class="border" width="100%">'; print '</table><br><br><table class="border" width="100%">';
// Input by // Assigned to
$var=false; print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
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">';
print $form->select_dolusers($act->usertodo->id>0?$act->usertodo->id:-1,'affectedto',1); print $form->select_dolusers($act->usertodo->id>0?$act->usertodo->id:-1,'affectedto',1);
print '</td></tr>'; 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 // Realised by
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">'; if ($conf->global->AGENDA_ENABLE_DONEBY)
print $form->select_dolusers($act->userdone->id> 0?$act->userdone->id:-1,'doneby',1); {
print '</td></tr>'; 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>'; print '</table><br><br>';
@ -909,23 +922,24 @@ if ($id > 0)
print '</table><br><br><table class="border" width="100%">'; print '</table><br><br><table class="border" width="100%">';
// Input by // Assigned to
$var=false; print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
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 '&nbsp;';
print '</td></tr>';
// Affecte a
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
if ($act->usertodo->id > 0) print $act->usertodo->getNomUrl(1); if ($act->usertodo->id > 0) print $act->usertodo->getNomUrl(1);
print '</td></tr>'; print '</td></tr>';
// Done by // Busy
print '<tr><td nowrap="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">'; print '<tr><td nowrap="nowrap">'.$langs->trans("Busy").'</td><td colspan="3">';
if ($act->userdone->id > 0) print $act->userdone->getNomUrl(1); print yn(($act->transparency > 0)?1:0);
print '</td></tr>'; 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%">'; print '</table><br><br><table class="border" width="100%">';
// Third party - Contact // Third party - Contact

View File

@ -75,7 +75,7 @@ class Contact extends CommonObject
var $user_login; var $user_login;
var $import_key; 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->country = 'France';
$this->email = 'specimen@specimen.com'; $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_public='This is a comment (public)';
$this->note='This is a comment (private)'; $this->note='This is a comment (private)';

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* 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> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* *
* This program is free software; you can redistribute it and/or modify * 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(); $now=dol_now();
$i = 0; $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) while ($i < $num)
{ {
@ -95,7 +95,7 @@ class box_factures_fourn extends ModeleBoxes
$datec=$db->jdate($objp->datec); $datec=$db->jdate($objp->datec);
$late = ''; $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"', $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
'logo' => $this->boximg, 'logo' => $this->boximg,

View File

@ -3478,7 +3478,7 @@ class Form
// If reset_scripts is not empty, print the button with the reset_scripts in OnClick // If reset_scripts is not empty, print the button with the reset_scripts in OnClick
if ($reset_scripts) 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.=$langs->trans("Now");
$retstring.='</button> '; $retstring.='</button> ';
} }

View File

@ -198,7 +198,7 @@ elseif ($action == 'setdate_lim_reglement' && $user->rights->fournisseur->factur
{ {
$object->fetch($id); $object->fetch($id);
$object->date_echeance=dol_mktime(12,0,0,$_POST['date_lim_reglementmonth'],$_POST['date_lim_reglementday'],$_POST['date_lim_reglementyear']); $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; $object->date_echeance=$object->date;
setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"),'warnings'); setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"),'warnings');

View File

@ -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 (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 (174, 'OM', 'Oman' );
insert into llx_c_pays (rowid,code,libelle) values (175, 'PK', 'Pakistan' ); 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 (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 (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 (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 (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 (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 (183, 'PN', 'Iles Pitcairn' );
insert into llx_c_pays (rowid,code,libelle) values (184, 'PL', 'Pologne' ); insert into llx_c_pays (rowid,code,libelle) values (184, 'PL', 'Pologne' );

View File

@ -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 (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); 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) -- 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 (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); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1842, 184, '7','0','VAT reduced rate',1);

View File

@ -219,7 +219,7 @@ CREATE TABLE llx_printer_ipp
printer_uri varchar(256) NOT NULL, printer_uri varchar(256) NOT NULL,
copy int(11) NOT NULL DEFAULT '1', copy int(11) NOT NULL DEFAULT '1',
module varchar(16) NOT NULL, module varchar(16) NOT NULL,
login varchar(32) NOT NULL, login varchar(32) NOT NULL
)ENGINE=innodb; )ENGINE=innodb;
ALTER TABLE llx_socpeople ADD COLUMN ref_ext varchar(128) after entity; 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_socpeople ADD COLUMN note_public text after note;
ALTER TABLE llx_societe 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;

View File

@ -45,6 +45,7 @@ create table llx_actioncomm
fk_parent integer NOT NULL default 0, fk_parent integer NOT NULL default 0,
fk_user_action integer, -- id de la personne qui doit effectuer l'action 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 fk_user_done integer, -- id de la personne qui a effectue l'action
priority smallint, priority smallint,
fulldayevent smallint NOT NULL default 0, fulldayevent smallint NOT NULL default 0,

View File

@ -378,12 +378,12 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
$modulesfile = array(); $modulesfile = array();
foreach ($conf->file->dol_document_root as $type => $dirroot) foreach ($conf->file->dol_document_root as $type => $dirroot)
{ {
$handlemodule=@opendir($dirroot); $handlemodule=@opendir($dirroot); // $dirroot may be '..'
if (is_resource($handlemodule)) if (is_resource($handlemodule))
{ {
while (($filemodule = readdir($handlemodule))!==false) 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; //print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file;
if (is_file($dirroot . '/' . $filemodule . '/sql/'.$file)) if (is_file($dirroot . '/' . $filemodule . '/sql/'.$file))

View File

@ -202,3 +202,4 @@ MembersStatisticsByProperties=Members statistics by characteristics
MembersByNature=Members by nature MembersByNature=Members by nature
VATToUseForSubscriptions=VAT rate to use for subscriptions VATToUseForSubscriptions=VAT rate to use for subscriptions
NoVatOnSubscription=No TVA for subscriptions NoVatOnSubscription=No TVA for subscriptions
MEMBER_PAYONLINE_SENDEMAIL=Email to warn when Dolibarr receive a confirmation of a validated payment for subscription

View 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

View 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...)

View File

@ -0,0 +1,4 @@
# Dolibarr language file - es_PU - companies
CHARSET=UTF-8
VATIsUsed=Sujeto a IGV
VATIsNotUsed=No sujeto a IGV

View 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")

View 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

View File

@ -0,0 +1,3 @@
# Dolibarr language file - es_PU - propal
CHARSET=UTF-8
AmountOfProposalsByMonthHT=Importe por mes (Sin IGV)

View File

@ -207,4 +207,4 @@ MembersStatisticsByProperties=Statistiques des adhérents par caractéristiques
MembersByNature=Adhérents par nature MembersByNature=Adhérents par nature
VATToUseForSubscriptions=Taux de TVA pour les adhésions VATToUseForSubscriptions=Taux de TVA pour les adhésions
NoVatOnSubscription=Pas de TVA sur 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

View File

@ -62,6 +62,32 @@ $tracepost = "";
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n"; foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox'); 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")); llxHeaderPayBox($langs->trans("PaymentForm"));

View File

@ -41,6 +41,15 @@ $langs->load("companies");
$langs->load("paybox"); $langs->load("paybox");
$langs->load("paypal"); $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 '<span id="dolpaymentspan"></span>'."\n";
print '<div id="dolpaymentdiv" align="center">'."\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"; print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n";
if (! empty($conf->global->PAYBOX_MESSAGE_OK)) print $conf->global->PAYBOX_MESSAGE_OK; if (! empty($conf->global->PAYBOX_MESSAGE_OK)) print $conf->global->PAYBOX_MESSAGE_OK;

View File

@ -71,6 +71,31 @@ foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal'); 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")); llxHeaderPaypal($langs->trans("PaymentForm"));

View File

@ -81,6 +81,15 @@ if (empty($PAYPAL_API_SIGNATURE))
return -1; 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 * Actions
@ -105,15 +114,6 @@ llxHeaderPaypal($langs->trans("PaymentForm"));
print '<span id="dolpaymentspan"></span>'."\n"; print '<span id="dolpaymentspan"></span>'."\n";
print '<div id="dolpaymentdiv" align="center">'."\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) if ($PAYPALTOKEN)
{ {
// Get on url call // 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); 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)) if (! empty($paymentType))
{ {
dol_syslog("We call GetExpressCheckoutDetails"); dol_syslog("We call GetExpressCheckoutDetails");

View File

@ -140,7 +140,7 @@ class Societe extends CommonObject
var $array_options; 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 // Fin appel triggers
} }
else $error++; else $error++;
if (! $error) if (! $error)
{ {
dol_syslog(get_class($this)."::Create success id=".$this->id); dol_syslog(get_class($this)."::Create success id=".$this->id);
@ -2585,6 +2585,9 @@ class Societe extends CommonObject
$this->email='specimen@specimen.com'; $this->email='specimen@specimen.com';
$this->url='http://www.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_client='CC-'.dol_print_date($now,'dayhourlog');
$this->code_fournisseur='SC-'.dol_print_date($now,'dayhourlog'); $this->code_fournisseur='SC-'.dol_print_date($now,'dayhourlog');
$this->capital=10000; $this->capital=10000;