replace html by html5 in donation
This commit is contained in:
parent
d659543ac0
commit
43aacbd55a
@ -232,10 +232,10 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Default").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Activated").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Default").'</td>';
|
||||
print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
@ -272,20 +272,20 @@ if (is_resource($handle))
|
||||
{
|
||||
if ($conf->global->DON_ADDON_MODEL == $name)
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print "<td class=\"center\">\n";
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print "<td class=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print "<td class=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
@ -293,13 +293,13 @@ if (is_resource($handle))
|
||||
// Default
|
||||
if ($conf->global->DON_ADDON_MODEL == "$name")
|
||||
{
|
||||
print "<td align=\"center\">";
|
||||
print "<td class=\"center\">";
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">";
|
||||
print "<td class=\"center\">";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
@ -314,12 +314,12 @@ if (is_resource($handle))
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, -1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'" target="specimen">'.img_object($langs->trans("Preview"), 'generic').'</a>';
|
||||
print '</td>';
|
||||
|
||||
@ -340,7 +340,7 @@ print load_fiche_titre($langs->trans("Options"), '', '');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameters").'</td>';
|
||||
print '<td width="60" align="center">'.$langs->trans("Value")."</td>\n";
|
||||
print '<td width="60" class="center">'.$langs->trans("Value")."</td>\n";
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -352,7 +352,7 @@ print '<tr class="oddeven">';
|
||||
print '<td colspan="2">';
|
||||
print $form->textwithpicto($langs->trans("DonationUserThirdparties"), $langs->trans("DonationUserThirdpartiesDesc"));
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('DONATION_USE_THIRDPARTIES');
|
||||
} else {
|
||||
@ -366,7 +366,7 @@ print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
$label = $langs->trans("AccountAccounting");
|
||||
print '<label for="DONATION_ACCOUNTINGACCOUNT">' . $label . '</label></td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
print $formaccounting->select_account($conf->global->DONATION_ACCOUNTINGACCOUNT, 'DONATION_ACCOUNTINGACCOUNT', 1, '', 1, 1);
|
||||
@ -375,7 +375,7 @@ else
|
||||
{
|
||||
print '<input type="text" size="10" id="DONATION_ACCOUNTINGACCOUNT" name="DONATION_ACCOUNTINGACCOUNT" value="' . $conf->global->DONATION_ACCOUNTINGACCOUNT . '">';
|
||||
}
|
||||
print '</td><td align="center">';
|
||||
print '</td><td class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
@ -387,7 +387,7 @@ print '<input type="hidden" name="action" value="set_DONATION_MESSAGE" />';
|
||||
print '<tr class="oddeven"><td colspan="2">';
|
||||
print $langs->trans("FreeTextOnDonations").' '.img_info($langs->trans("AddCRIfTooLong")).'<br>';
|
||||
print '<textarea name="DONATION_MESSAGE" class="flat" cols="80">'.$conf->global->DONATION_MESSAGE.'</textarea>';
|
||||
print '</td><td align="center">';
|
||||
print '</td><td class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -405,12 +405,12 @@ if (preg_match('/fr/i', $conf->global->MAIN_INFO_SOCIETE_COUNTRY))
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||
print '<td align="center">'.$langs->trans("Status").'</td>'."\n";
|
||||
print '<td class="center">'.$langs->trans("Status").'</td>'."\n";
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="80%">' . $langs->trans("DONATION_ART200") . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('DONATION_ART200');
|
||||
} else {
|
||||
@ -421,7 +421,7 @@ if ($conf->use_javascript_ajax) {
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="80%">' . $langs->trans("DONATION_ART238") . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('DONATION_ART238');
|
||||
} else {
|
||||
@ -432,7 +432,7 @@ if ($conf->use_javascript_ajax) {
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="80%">' . $langs->trans("DONATION_ART885") . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('DONATION_ART885');
|
||||
} else {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/don/admin/donation_extrafields.php
|
||||
* \ingroup donations
|
||||
* \brief Page to setup extra fields of donations
|
||||
* \file htdocs/don/admin/donation_extrafields.php
|
||||
* \ingroup donations
|
||||
* \brief Page to setup extra fields of donations
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
@ -746,7 +746,7 @@ if ($object->socid) {
|
||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||
print '<td>'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
while ($i < $num)
|
||||
@ -758,7 +758,7 @@ if ($object->socid) {
|
||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||
$labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type;
|
||||
print "<td>".$labeltype.' '.$objp->num_payment."</td>\n";
|
||||
print '<td align="right">'.price($objp->amount)."</td>\n";
|
||||
print '<td class="right">'.price($objp->amount)."</td>\n";
|
||||
print "</tr>";
|
||||
$totalpaid += $objp->amount;
|
||||
$i++;
|
||||
@ -766,13 +766,13 @@ if ($object->socid) {
|
||||
|
||||
if ($object->paid == 0)
|
||||
{
|
||||
print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("AlreadyPaid")." :</td><td align=\"right\">".price($totalpaid)."</td></tr>\n";
|
||||
print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("AmountExpected")." :</td><td align=\"right\">".price($object->amount)."</td></tr>\n";
|
||||
print "<tr><td colspan=\"3\" class=\"right\">".$langs->trans("AlreadyPaid")." :</td><td class=\"right\">".price($totalpaid)."</td></tr>\n";
|
||||
print "<tr><td colspan=\"3\" class=\"right\">".$langs->trans("AmountExpected")." :</td><td class=\"right\">".price($object->amount)."</td></tr>\n";
|
||||
|
||||
$remaintopay = $object->amount - $totalpaid;
|
||||
|
||||
print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("RemainderToPay")." :</td>";
|
||||
print '<td align="right"'.($resteapayeraffiche?' class="amountremaintopay"':'').'><b>'.price($remaintopay)."</b></td></tr>\n";
|
||||
print "<tr><td colspan=\"3\" class=\"right\">".$langs->trans("RemainderToPay")." :</td>";
|
||||
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':'').'><b>'.price($remaintopay)."</b></td></tr>\n";
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -58,7 +58,7 @@ class Donations extends DolibarrApi
|
||||
*
|
||||
* @param int $id ID of order
|
||||
* @return array|mixed data without useless information
|
||||
*
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
public function get($id)
|
||||
@ -89,13 +89,13 @@ class Donations extends DolibarrApi
|
||||
*
|
||||
* Get a list of donations
|
||||
*
|
||||
* @param string $sortfield Sort field
|
||||
* @param string $sortorder Sort order
|
||||
* @param int $limit Limit for list
|
||||
* @param int $page Page number
|
||||
* @param string $thirdparty_ids Thirdparty ids to filter orders of. {@example '1' or '1,2,3'} {@pattern /^[0-9,]*$/i}
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
||||
* @return array Array of order objects
|
||||
* @param string $sortfield Sort field
|
||||
* @param string $sortorder Sort order
|
||||
* @param int $limit Limit for list
|
||||
* @param int $page Page number
|
||||
* @param string $thirdparty_ids Thirdparty ids to filter orders of. {@example '1' or '1,2,3'} {@pattern /^[0-9,]*$/i}
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
||||
* @return array Array of order objects
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
@ -177,8 +177,8 @@ class Donations extends DolibarrApi
|
||||
public function post($request_data = null)
|
||||
{
|
||||
if (! DolibarrApiAccess::$user->rights->don->creer) {
|
||||
throw new RestException(401, "Insuffisant rights");
|
||||
}
|
||||
throw new RestException(401, "Insuffisant rights");
|
||||
}
|
||||
// Check mandatory fields
|
||||
$result = $this->_validate($request_data);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -126,7 +126,7 @@ foreach ($listofstatus as $status)
|
||||
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr><td align="center" colspan="4">';
|
||||
print '<tr><td class="center" colspan="4">';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
$dolgraph = new DolGraph();
|
||||
@ -143,9 +143,9 @@ if ($conf->use_javascript_ajax)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Number").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Average").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Number").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Average").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$total=0;
|
||||
@ -155,9 +155,9 @@ foreach ($listofstatus as $status)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><a href="list.php?statut='.$status.'">'.$donstatic->LibStatut($status, 4).'</a></td>';
|
||||
print '<td align="right">'.(! empty($nb[$status])?$nb[$status]:' ').'</td>';
|
||||
print '<td align="right">'.(! empty($nb[$status])?price($somme[$status], 'MT'):' ').'</td>';
|
||||
print '<td align="right">'.(! empty($nb[$status])?price(price2num($somme[$status]/$nb[$status], 'MT')):' ').'</td>';
|
||||
print '<td class="right">'.(! empty($nb[$status])?$nb[$status]:' ').'</td>';
|
||||
print '<td class="right">'.(! empty($nb[$status])?price($somme[$status], 'MT'):' ').'</td>';
|
||||
print '<td class="right">'.(! empty($nb[$status])?price(price2num($somme[$status]/$nb[$status], 'MT')):' ').'</td>';
|
||||
$totalnb += (! empty($nb[$status])?$nb[$status]:0);
|
||||
$total += (! empty($somme[$status])?$somme[$status]:0);
|
||||
print "</tr>";
|
||||
@ -165,9 +165,9 @@ foreach ($listofstatus as $status)
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.$totalnb.'</td>';
|
||||
print '<td align="right">'.price($total, 'MT').'</td>';
|
||||
print '<td align="right">'.($totalnb?price(price2num($total/$totalnb, 'MT')):' ').'</td>';
|
||||
print '<td class="right">'.$totalnb.'</td>';
|
||||
print '<td class="right">'.price($total, 'MT').'</td>';
|
||||
print '<td class="right">'.($totalnb?price(price2num($total/$totalnb, 'MT')):' ').'</td>';
|
||||
print '</tr>';
|
||||
print "</table>";
|
||||
|
||||
@ -218,14 +218,14 @@ if ($resql)
|
||||
print dolGetFirstLastname($obj->lastname, $obj->firstname);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right" class="nobordernopadding">';
|
||||
print '<td class="right nobordernopadding">';
|
||||
print price($obj->amount, 1);
|
||||
print '</td>';
|
||||
|
||||
// Date
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
|
||||
|
||||
print '<td align="right">'.$donation_static->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '<td class="right">'.$donation_static->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/don/list.php
|
||||
* \ingroup donations
|
||||
* \brief List of donations
|
||||
* \file htdocs/don/list.php
|
||||
* \ingroup donations
|
||||
* \brief List of donations
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -178,18 +178,18 @@ if ($resql)
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
|
||||
print '<td class="liste_titre" align="right"></td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
|
||||
print '<td class="liste_titre right"></td>';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -222,7 +222,7 @@ if ($resql)
|
||||
print "<td>".$donationstatic->getNomUrl(1)."</td>\n";
|
||||
print "<td>".$objp->societe."</td>\n";
|
||||
print "<td>".$donationstatic->getFullName($langs)."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datedon), 'day').'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->datedon), 'day').'</td>';
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print "<td>";
|
||||
@ -238,20 +238,20 @@ if ($resql)
|
||||
else print ' ';
|
||||
print "</td>\n";
|
||||
}
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td align="right">'.$donationstatic->LibStatut($objp->statut, 5).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.$donationstatic->LibStatut($objp->statut, 5).'</td>';
|
||||
print '<td></td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
print "</form>\n";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -216,9 +217,9 @@ if ($resql)
|
||||
print '<br><table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('Donation').'</td>';
|
||||
print '<td align="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
print '<td align="center">'.$langs->trans('Status').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||
print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
print '<td class="center">'.$langs->trans('Status').'</td>';
|
||||
print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if ($num > 0)
|
||||
@ -234,14 +235,14 @@ if ($resql)
|
||||
print $don->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
// Expected to pay
|
||||
print '<td align="right">'.price($objp->d_amount).'</td>';
|
||||
print '<td class="right">'.price($objp->d_amount).'</td>';
|
||||
// Status
|
||||
print '<td align="center">'.$don->getLibStatut(4, $objp->amount).'</td>';
|
||||
print '<td class="center">'.$don->getLibStatut(4, $objp->amount).'</td>';
|
||||
// Amount payed
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
print "</tr>\n";
|
||||
if ($objp->paid == 1) // If at least one invoice is paid, disable delete
|
||||
{
|
||||
if ($objp->paid == 1) {
|
||||
// If at least one invoice is paid, disable delete
|
||||
$disable_delete = 1;
|
||||
}
|
||||
$total = $total + $objp->amount;
|
||||
|
||||
@ -35,8 +35,7 @@ $amounts = array();
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
if ($user->societe_id > 0) {
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
@ -244,10 +243,10 @@ if (GETPOST('action', 'aZ09') == 'create')
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AlreadyPaid").'</td>';
|
||||
print '<td align="right">'.$langs->trans("RemainderToPay").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Amount").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>';
|
||||
print '<td class="right">'.$langs->trans("RemainderToPay").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Amount").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$total=0;
|
||||
@ -259,13 +258,13 @@ if (GETPOST('action', 'aZ09') == 'create')
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td align="right">'.price($objp->amount)."</td>";
|
||||
print '<td class="right">'.price($objp->amount)."</td>";
|
||||
|
||||
print '<td align="right">'.price($sumpaid)."</td>";
|
||||
print '<td class="right">'.price($sumpaid)."</td>";
|
||||
|
||||
print '<td align="right">'.price($objp->amount - $sumpaid)."</td>";
|
||||
print '<td class="right">'.price($objp->amount - $sumpaid)."</td>";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($sumpaid < $objp->amount)
|
||||
{
|
||||
$namef = "amount_".$objp->id;
|
||||
@ -287,11 +286,11 @@ if (GETPOST('action', 'aZ09') == 'create')
|
||||
{
|
||||
// Print total
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="2" align="left">'.$langs->trans("Total").':</td>';
|
||||
print "<td align=\"right\"><b>".price($total_ttc)."</b></td>";
|
||||
print "<td align=\"right\"><b>".price($totalrecu)."</b></td>";
|
||||
print "<td align=\"right\"><b>".price($total_ttc - $totalrecu)."</b></td>";
|
||||
print '<td align="center"> </td>';
|
||||
print '<td colspan="2" class="left">'.$langs->trans("Total").':</td>';
|
||||
print "<td class=\"right\"><b>".price($total_ttc)."</b></td>";
|
||||
print "<td class=\"right\"><b>".price($totalrecu)."</b></td>";
|
||||
print "<td class=\"right\"><b>".price($total_ttc - $totalrecu)."</b></td>";
|
||||
print '<td class="center"> </td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -253,7 +253,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
arsort($arrayyears);
|
||||
print $form->selectarray('year', $arrayyears, $year, 0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '<tr><td class="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '<br><br>';
|
||||
@ -262,10 +262,10 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="center">'.$langs->trans("NbOfSendings").'</td>';
|
||||
/*print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td align="center">'.$langs->trans("AmountAverage").'</td>';*/
|
||||
print '<td class="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td class="center">'.$langs->trans("NbOfSendings").'</td>';
|
||||
/*print '<td class="center">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td class="center">'.$langs->trans("AmountAverage").'</td>';*/
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
@ -276,19 +276,19 @@ foreach ($data as $val)
|
||||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.'">'.$oldyear.'</a></td>';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.'">'.$oldyear.'</a></td>';
|
||||
|
||||
print '<td align="right">0</td>';
|
||||
/*print '<td align="right">0</td>';
|
||||
print '<td align="right">0</td>';*/
|
||||
print '<td class="right">0</td>';
|
||||
/*print '<td class="right">0</td>';
|
||||
print '<td class="right">0</td>';*/
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
/*print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
||||
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';*/
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.'">'.$year.'</a></td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
/*print '<td class="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
||||
print '<td class="right">'.price(price2num($val['avg'],'MT'),1).'</td>';*/
|
||||
print '</tr>';
|
||||
$oldyear=$year;
|
||||
}
|
||||
@ -301,7 +301,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
// Show graphs
|
||||
print '<table class="border" width="100%"><tr class="pair nohover"><td align="center">';
|
||||
print '<table class="border" width="100%"><tr class="pair nohover"><td class="center">';
|
||||
if ($mesg) { print $mesg; }
|
||||
else {
|
||||
print $px1->show();
|
||||
@ -323,8 +323,8 @@ dol_fiche_end();
|
||||
// TODO USe code similar to commande/stats/index.php instead of this one.
|
||||
/*
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td width="40%" align="center">'.$langs->trans("NbOfSendings").'</td></tr>';
|
||||
print '<tr><td class="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td width="40%" class="center">'.$langs->trans("NbOfSendings").'</td></tr>';
|
||||
|
||||
$sql = "SELECT count(*) as nb, date_format(date_expedition,'%Y') as dm";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."expedition";
|
||||
@ -343,7 +343,7 @@ if ($resql)
|
||||
$nbproduct = $row[0];
|
||||
$year = $row[1];
|
||||
print "<tr>";
|
||||
print '<td align="center"><a href="month.php?year='.$year.'">'.$year.'</a></td><td align="center">'.$nbproduct.'</td></tr>';
|
||||
print '<td class="center"><a href="month.php?year='.$year.'">'.$year.'</a></td><td class="center">'.$nbproduct.'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,8 +33,7 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
$langs->load("donations");
|
||||
|
||||
$total=0; $ilink=0;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
foreach($linkedObjectBlock as $key => $objectlink) {
|
||||
$ilink++;
|
||||
|
||||
$trclass='oddeven';
|
||||
@ -43,14 +42,14 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<tr class="<?php echo $trclass; ?>">
|
||||
<td><?php echo $langs->trans("Donation"); ?></td>
|
||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||
<td align="center"><?php echo $objectlink->ref_client; ?></td>
|
||||
<td align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
<td class="center"><?php echo $objectlink->ref_client; ?></td>
|
||||
<td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||
<td class="right"><?php
|
||||
$total = $total + $objectlink->total_ht;
|
||||
echo price($objectlink->total_ht);
|
||||
} ?>
|
||||
</td>
|
||||
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -60,11 +59,11 @@ if (count($linkedObjectBlock) > 1)
|
||||
<tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':''); ?>">
|
||||
<td><?php echo $langs->trans("Total"); ?></td>
|
||||
<td></td>
|
||||
<td align="center"></td>
|
||||
<td align="center"></td>
|
||||
<td align="right"><?php echo price($total); ?></td>
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
<td class="center"></td>
|
||||
<td class="center"></td>
|
||||
<td class="right"><?php echo price($total); ?></td>
|
||||
<td class="right"></td>
|
||||
<td class="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user