Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
1029932e6a
25 changed files with 4200 additions and 1430 deletions
57
dev/tools/make_sprite.sh
Normal file
57
dev/tools/make_sprite.sh
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Based of: https://gist.github.com/jaymzcd/342399 and https://github.com/buren/flag-sprite-maker
|
||||
|
||||
# uses imagemagick to stich together all images in a folder and
|
||||
# then writes a css file with the correct offsets along with a
|
||||
# test html page for verification that its all good
|
||||
|
||||
# Usage:
|
||||
# $ ./make_sprite.sh path class_name image_extension
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
name='output'; # output will be placed in a folder named this
|
||||
path="${1:-}" # Path to flag images
|
||||
classname=${2:-flag}"-sprite"
|
||||
ext="."${3:-png}; # the extension to iterate over for input files
|
||||
|
||||
css="$name/$classname.css";
|
||||
html="$name/test.html";
|
||||
|
||||
rm -fr $name;
|
||||
mkdir $name;
|
||||
touch $css $html;
|
||||
|
||||
echo "Generating sprite file...";
|
||||
convert $path*$ext -append $name/$classname$ext;
|
||||
echo "Sprite complete! - Creating css & test output...";
|
||||
|
||||
echo -e "<html>\n<head>\n\t<link rel=\"stylesheet\" href=\"`basename $css`\" />\n</head>\n<body>\n\t<h1>Sprite test page</h1>\n" >> $html
|
||||
|
||||
echo -e ".$classname {\n\tbackground:url('$classname$ext') no-repeat top left; display:inline-block;\n}" >> $css;
|
||||
counter=0;
|
||||
offset=0;
|
||||
for file in $path*$ext
|
||||
do
|
||||
width=`identify -format "%[fx:w]" "$file"`;
|
||||
height=`identify -format "%[fx:h]" "$file"`;
|
||||
idname=`basename "$file" $ext`;
|
||||
clean=${idname// /-}
|
||||
echo -e ".$classname.$clean {" >> $css;
|
||||
echo -e "\tbackground-position:0 -${offset}px;" >> $css;
|
||||
echo -e "\twidth: ${width}px;" >> $css;
|
||||
echo -e "\theight: ${height}px;\n}" >> $css;
|
||||
|
||||
echo -e "<div style=\"display:inline-block;width:100px;\"><div style=\"overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;\">$clean</div> <a href=\"#\" class=\"$classname $clean\"></a></div>\n" >> $html;
|
||||
|
||||
let offset+=$height;
|
||||
let counter+=1;
|
||||
echo -e "\t#$counter done";
|
||||
done
|
||||
|
||||
echo -e "<h2>Full sprite:</h2>\n<img src=\"$classname$ext\" />" >> $html;
|
||||
echo -e "</body>\n</html>" >> $html;
|
||||
|
||||
echo -e "\nComplete! - $counter sprites created, css written & test page output.";
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2020-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2023 Waël Almoman <info@almoman.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
|
||||
|
|
@ -103,13 +104,15 @@ if ($action == 'set_default') {
|
|||
}
|
||||
} elseif ($action == 'updatemainoptions') {
|
||||
$db->begin();
|
||||
$res1 = $res2 = $res3 = $res4 = $res5 = $res6 = $res7 = 0;
|
||||
$res1 = $res2 = $res3 = $res4 = $res5 = $res6 = $res7 = $res8 = $res9 = 0;
|
||||
$res1 = dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha') ? 0 : 1, 'chaine', 0, '', $conf->entity);
|
||||
$res2 = dolibarr_set_const($db, 'ADHERENT_MAIL_REQUIRED', GETPOST('ADHERENT_MAIL_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res3 = dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res3 = dolibarr_set_const($db, 'ADHERENT_CREATE_EXTERNAL_USER_LOGIN', GETPOST('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res4 = dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res7 = dolibarr_set_const($db, 'MEMBER_PUBLIC_ENABLED', GETPOST('MEMBER_PUBLIC_ENABLED', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res8 = dolibarr_set_const($db, 'MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF', GETPOST('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
$res9 = dolibarr_set_const($db, 'MEMBER_SUBSCRIPTION_START_AFTER', GETPOST('MEMBER_SUBSCRIPTION_START_AFTER', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
// Use vat for invoice creation
|
||||
if (isModEnabled('facture')) {
|
||||
$res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
|
@ -335,6 +338,24 @@ print '<td>'.$langs->trans("Description").'</td>';
|
|||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Start date of new membership
|
||||
$startpoint[0] = $langs->trans("SubscriptionPayment");
|
||||
$startpoint["m"] = $langs->trans("Month");
|
||||
$startpoint["Y"] = $langs->trans("Year");
|
||||
print '<tr class="oddeven drag" id="startfirstdayof"><td>';
|
||||
print $langs->trans("MemberSubscriptionStartFirstDayOf");
|
||||
print '</td><td>';
|
||||
$startfirstdayof = !getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') ? 0 : getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF');
|
||||
print $form->selectarray("MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF", $startpoint, $startfirstdayof, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Delay to start the new membership ([+/-][0-99][Y/m/d], for instance, with "+4m", the subscription will start in 4 month.)
|
||||
print '<tr class="oddeven drag" id="startfirstdayof"><td>';
|
||||
print $langs->trans("MemberSubscriptionStartAfter");
|
||||
print '</td><td>';
|
||||
print '<input type="text" class="right width50" id="MEMBER_SUBSCRIPTION_START_AFTER" name="MEMBER_SUBSCRIPTION_START_AFTER" value="'.(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER') ? getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER') : '').'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Mail required for members
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("AdherentMailRequired").'</td><td>';
|
||||
print $form->selectyesno('ADHERENT_MAIL_REQUIRED', (getDolGlobalString('ADHERENT_MAIL_REQUIRED') ? $conf->global->ADHERENT_MAIL_REQUIRED : 0), 1);
|
||||
|
|
|
|||
|
|
@ -48,8 +48,11 @@ if ($user->socid > 0) {
|
|||
$result = restrictedArea($user, 'adherent', '', '', 'cotisation');
|
||||
|
||||
$year = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
|
||||
$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, $conf->global->MAIN_STATS_GRAPHS_SHOW_N_YEARS)));
|
||||
$startyear = $year - (!getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
|
||||
$endyear = $year;
|
||||
if (!empty(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) ) {
|
||||
$endyear = dol_print_date(dol_time_plus_duree(dol_now('gmt'), (int) substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), 0, -1), substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), -1)), "%Y", 'gmt');
|
||||
}
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies", "members"));
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2023 Waël Almoman <info@almoman.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
|
||||
|
|
@ -53,7 +54,7 @@ $typeid = GETPOST('typeid', 'int');
|
|||
$cancel = GETPOST('cancel');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
|
|
@ -960,8 +961,6 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
|
|||
print '<table class="border centpercent">'."\n";
|
||||
print '<tbody>';
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
// Date payment
|
||||
if (GETPOST('paymentyear') && GETPOST('paymentmonth') && GETPOST('paymentday')) {
|
||||
$paymentdate = dol_mktime(0, 0, 0, GETPOST('paymentmonth'), GETPOST('paymentday'), GETPOST('paymentyear'));
|
||||
|
|
@ -977,10 +976,16 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
|
|||
}
|
||||
if (!$datefrom) {
|
||||
$datefrom = $object->datevalid;
|
||||
if ($object->datefin > 0 && dol_time_plus_duree($object->datefin, $defaultdelay, $defaultdelayunit) > dol_now()) {
|
||||
if (!empty(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) ) {
|
||||
$datefrom = dol_time_plus_duree($now, (int) substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), 0, -1), substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), -1));
|
||||
} elseif ($object->datefin > 0 && dol_time_plus_duree($object->datefin, $defaultdelay, $defaultdelayunit) > $now) {
|
||||
$datefrom = dol_time_plus_duree($object->datefin, 1, 'd');
|
||||
} else {
|
||||
$datefrom = dol_get_first_day($currentyear);
|
||||
}
|
||||
|
||||
if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "m") {
|
||||
$datefrom = dol_get_first_day(dol_print_date($datefrom, "%Y"), dol_print_date($datefrom, "%m"));
|
||||
} elseif (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "Y") {
|
||||
$datefrom = dol_get_first_day(dol_print_date($datefrom, "%Y"));
|
||||
}
|
||||
}
|
||||
print $form->selectDate($datefrom, '', '', '', '', "subscription", 1, 1);
|
||||
|
|
|
|||
|
|
@ -1096,6 +1096,8 @@ if ($action == 'create') {
|
|||
$title = $langs->trans("Recurrence");
|
||||
print load_fiche_titre(img_picto('', 'recurring', 'class="pictofixedwidth"').$title, '', '');
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("ToCreateARecurringInvoiceGeneAuto", $langs->transnoentitiesnoconv('Module2300Name')).'</span><br><br>';
|
||||
|
||||
print dol_get_fiche_head(null, '', '', 0);
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
|
|
@ -1118,7 +1120,7 @@ if ($action == 'create') {
|
|||
print "</td></tr>";
|
||||
|
||||
// Auto validate the invoice
|
||||
print "<tr><td>".$langs->trans("StatusOfGeneratedInvoices")."</td><td>";
|
||||
print "<tr><td>".$langs->trans("StatusOfAutoGeneratedInvoices")."</td><td>";
|
||||
$select = array('0'=>$langs->trans('BillStatusDraft'), '1'=>$langs->trans('BillStatusValidated'));
|
||||
print $form->selectarray('auto_validate', $select, GETPOST('auto_validate'));
|
||||
print "</td></tr>";
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ class Cchargesociales
|
|||
* @param int $fromid Id of object to clone
|
||||
* @return int New id of clone
|
||||
*/
|
||||
public function createFromClone(User $user, $fromid)
|
||||
/*public function createFromClone(User $user, $fromid)
|
||||
{
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
|
|
@ -406,7 +406,7 @@ class Cchargesociales
|
|||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Return a link to the user card (with optionaly the picto)
|
||||
|
|
@ -419,7 +419,7 @@ class Cchargesociales
|
|||
* @param string $morecss Add more css on link
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '')
|
||||
/*public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '')
|
||||
{
|
||||
global $langs, $conf, $db;
|
||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||
|
|
@ -446,7 +446,7 @@ class Cchargesociales
|
|||
}
|
||||
$result .= $link.$this->ref.$linkend;
|
||||
return $result;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Return the label of the status
|
||||
|
|
@ -454,10 +454,10 @@ class Cchargesociales
|
|||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
|
||||
* @return string Label of status
|
||||
*/
|
||||
public function getLibStatut($mode = 0)
|
||||
/*public function getLibStatut($mode = 0)
|
||||
{
|
||||
return $this->LibStatut($this->status, $mode);
|
||||
}
|
||||
}*/
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -741,9 +741,9 @@ class ChargeSociales extends CommonObject
|
|||
$this->ref = 'SPECIMEN';
|
||||
$this->specimen = 1;
|
||||
$this->paye = 0;
|
||||
$this->date = dol_now();
|
||||
$this->date_ech = $this->date + 3600 * 24 * 30;
|
||||
$this->periode = $this->date + 3600 * 24 * 30;
|
||||
$this->date_creation = dol_now();
|
||||
$this->date_ech = $this->date_creation + 3600 * 24 * 30;
|
||||
$this->periode = $this->date_creation + 3600 * 24 * 30;
|
||||
$this->amount = 100;
|
||||
$this->label = 'Social contribution label';
|
||||
$this->type = 1;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,26 @@ class PaymentSocialContribution extends CommonObject
|
|||
public $tms = '';
|
||||
public $datep = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_code;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_label;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $bank_account;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $bank_line;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see $amount
|
||||
|
|
|
|||
|
|
@ -113,6 +113,26 @@ class PaymentVAT extends CommonObject
|
|||
*/
|
||||
public $datepaye;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_code;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_label;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $bank_account;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $bank_line;
|
||||
|
||||
/**
|
||||
* @var integer|string paiementtype
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -62,6 +62,26 @@ class Tva extends CommonObject
|
|||
public $type_payment;
|
||||
public $num_payment;
|
||||
|
||||
/**
|
||||
* @var DateTime
|
||||
*/
|
||||
public $datec;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $fk_type;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $paye;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $rappro;
|
||||
|
||||
/**
|
||||
* @var integer|string totalpaid
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -100,6 +100,34 @@ abstract class CommonInvoice extends CommonObject
|
|||
public $multicurrency_total_tva;
|
||||
public $multicurrency_total_ttc;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $stripechargedone;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $stripechargeerror;
|
||||
|
||||
/**
|
||||
* Payment description
|
||||
* @var string
|
||||
*/
|
||||
public $description;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated
|
||||
* @see $ref_customer
|
||||
*/
|
||||
public $ref_client;
|
||||
|
||||
/**
|
||||
* @var int Situation cycle reference number
|
||||
*/
|
||||
public $situation_cycle_ref;
|
||||
|
||||
/**
|
||||
* ! Closing after partial payment: discount_vat, badsupplier, abandon
|
||||
* ! Closing when no payment: replaced, abandoned
|
||||
|
|
|
|||
|
|
@ -9627,7 +9627,8 @@ function picto_from_langcode($codelang, $moreatt = '', $notitlealt = 0)
|
|||
$flagImage = empty($tmparray[1]) ? $tmparray[0] : $tmparray[1];
|
||||
}
|
||||
|
||||
return img_picto_common($codelang, 'flags/'.strtolower($flagImage).'.png', $moreatt, 0, $notitlealt);
|
||||
// return img_picto_common($codelang, 'flags/'.strtolower($flagImage).'.png', $moreatt, 0, $notitlealt);
|
||||
return '<span class="flag-sprite '.strtolower($flagImage).'"'.($moreatt ? ' '.$moreatt : '').(!$notitlealt ? ' title="'.$codelang.'"' : '').'></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2880,10 +2880,12 @@ function acceptLocalLinktoMedia()
|
|||
}
|
||||
|
||||
//var_dump($iptocheck.' '.$acceptlocallinktomedia);
|
||||
if (!filter_var($iptocheck, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
|
||||
$allowParamName = 'MAIN_ALLOW_WYSIWYG_LOCAL_MEDIAS_ON_PRIVATE_NETWORK';
|
||||
$allowPrivateNetworkIP = getDolGlobalInt($allowParamName);
|
||||
if (!$allowPrivateNetworkIP && !filter_var($iptocheck, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
|
||||
// If ip of public url is a private network IP, we do not allow this.
|
||||
$acceptlocallinktomedia = 0;
|
||||
// TODO Show a warning
|
||||
setEventMessage("WYSIWYG Editor : local media not allowed (checked IP: {$iptocheck}). Use {$allowParamName} = 1 to allow local network ip", 'warnings');
|
||||
}
|
||||
|
||||
if (preg_match('/http:/i', $urlwithouturlroot)) {
|
||||
|
|
|
|||
|
|
@ -1025,6 +1025,8 @@ if ($action == 'create') {
|
|||
$title = $langs->trans("Recurrence");
|
||||
print load_fiche_titre(img_picto('', 'recurring', 'class="pictofixedwidth"') . $title, '', '');
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("ToCreateARecurringInvoiceGeneAuto", $langs->transnoentitiesnoconv('Module2300Name')).'</span><br><br>';
|
||||
|
||||
print dol_get_fiche_head(null, '', '', 0);
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
|
|
@ -1053,7 +1055,7 @@ if ($action == 'create') {
|
|||
|
||||
// Auto generate document
|
||||
if (!empty($conf->global->INVOICE_REC_CAN_DISABLE_DOCUMENT_FILE_GENERATION)) {
|
||||
print "<tr><td>" . $langs->trans("StatusOfGeneratedDocuments") . "</td><td>";
|
||||
print "<tr><td>" . $langs->trans("StatusOfAutoGeneratedDocuments") . "</td><td>";
|
||||
$select = array('0' => $langs->trans('DoNotGenerateDoc'), '1' => $langs->trans('AutoGenerateDoc'));
|
||||
print $form->selectarray('generate_pdf', $select, GETPOST('generate_pdf'));
|
||||
print "</td></tr>";
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ EnterPaymentDueToCustomer=Make payment due to customer
|
|||
DisabledBecauseRemainderToPayIsZero=Disabled because remaining unpaid is zero
|
||||
PriceBase=Base price
|
||||
BillStatus=Invoice status
|
||||
StatusOfGeneratedInvoices=Status of generated invoices
|
||||
StatusOfAutoGeneratedInvoices=Status of automatically generated invoices
|
||||
BillStatusDraft=Draft (needs to be validated)
|
||||
BillStatusPaid=Paid
|
||||
BillStatusPaidBackOrConverted=Credit note refund or marked as credit available
|
||||
|
|
@ -642,4 +642,4 @@ MentionCategoryOfOperations0=Delivery of goods
|
|||
MentionCategoryOfOperations1=Provision of services
|
||||
MentionCategoryOfOperations2=Mixed - Delivery of goods & provision of services
|
||||
Salaries=Salaries
|
||||
InvoiceSubtype=Invoice Subtype
|
||||
InvoiceSubtype=Invoice Subtype
|
||||
|
|
|
|||
|
|
@ -241,3 +241,5 @@ MemberFirstname=Member firstname
|
|||
MemberLastname=Member lastname
|
||||
MemberCodeDesc=Member Code, unique for all members
|
||||
NoRecordedMembers=No recorded members
|
||||
MemberSubscriptionStartFirstDayOf=The start date of a membership corresponds to the first day of a
|
||||
MemberSubscriptionStartAfter=Minimum period before the entry into force of the start date of a subscription except renewals (example +3m = +3 months, -5d = -3 days, +1Y = +1 year) (example: +3m = +3 months, -5d = -3 days, +1Y = +1 year)
|
||||
|
|
@ -241,3 +241,5 @@ MemberFirstname=Prénom du membre
|
|||
MemberLastname=Nom de famille du membre
|
||||
MemberCodeDesc=Code membre, unique pour tous les membres
|
||||
NoRecordedMembers=Aucun membre enregistré
|
||||
MemberSubscriptionStartFirstDayOf=La date de début d'une adhésion correspond au premier jour d'un(e)
|
||||
MemberSubscriptionStartAfter=Délai minimum avant l'entrée en vigueur de la date de début d'une souscription hors renouvellement (exemple +3m = +3 mois, -5d = -3 jours, +1Y = +1 année)
|
||||
|
|
@ -276,10 +276,10 @@ $sql = 'SELECT p.rowid, p.ref, p.label, p.description, p.price, p.pmp,';
|
|||
$sql .= ' p.price_ttc, p.price_base_type, p.fk_product_type, p.desiredstock, p.seuil_stock_alerte,';
|
||||
$sql .= ' p.tms as datem, p.duration, p.tobuy, p.stock, ';
|
||||
if (!empty($search_fk_warehouse)) {
|
||||
$sql .= " SUM(p.pmp * ps.reel) as estimatedvalue, SUM(p.price * ps.reel) as sellvalue";
|
||||
$sql .= " SUM(p.pmp * ps.reel) as currentvalue, SUM(p.price * ps.reel) as sellvalue";
|
||||
$sql .= ', SUM(ps.reel) as stock_reel';
|
||||
} else {
|
||||
$sql .= " SUM(p.pmp * p.stock) as estimatedvalue, SUM(p.price * p.stock) as sellvalue";
|
||||
$sql .= " SUM(p.pmp * p.stock) as currentvalue, SUM(p.price * p.stock) as sellvalue";
|
||||
}
|
||||
// Add fields from hooks
|
||||
$parameters = array();
|
||||
|
|
@ -611,12 +611,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||
|
||||
// PMP value
|
||||
print '<td class="right">';
|
||||
if (price2num($stock * $objp->pmp, 'MT')) {
|
||||
print '<span class="amount">'.price(price2num($stock * $objp->pmp, 'MT'), 1).'</span>';
|
||||
$estimatedvalue = $stock * $objp->pmp;
|
||||
if (price2num($estimatedvalue, 'MT')) {
|
||||
print '<span class="amount">'.price(price2num($estimatedvalue, 'MT'), 1).'</span>';
|
||||
} else {
|
||||
print '';
|
||||
}
|
||||
$totalbuyingprice += $stock * $objp->pmp;
|
||||
$totalbuyingprice += $estimatedvalue;
|
||||
print '</td>';
|
||||
|
||||
// Selling value
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2021 Maxime Demarest <maxime@indelog.fr>
|
||||
* Copyright (C) 2021 Dorian Vabre <dorian.vabre@gmail.com>
|
||||
*
|
||||
|
|
@ -522,9 +522,17 @@ if ($ispaymentok) {
|
|||
}
|
||||
|
||||
// Subscription informations
|
||||
$datesubscription = $object->datevalid;
|
||||
$datesubscription = $object->datevalid; // By default, the subscription start date is the payment date
|
||||
if ($object->datefin > 0) {
|
||||
$datesubscription = dol_time_plus_duree($object->datefin, 1, 'd');
|
||||
} elseif (getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) {
|
||||
$datesubscription = dol_time_plus_duree($now, (int) substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), 0, -1), substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), -1));
|
||||
}
|
||||
|
||||
if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "m") {
|
||||
$datesubscription = dol_get_first_day(dol_print_date($datesubscription, "%Y"), dol_print_date($datesubscription, "%m"));
|
||||
} elseif (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "Y") {
|
||||
$datesubscription = dol_get_first_day(dol_print_date($datesubscription, "%Y"));
|
||||
}
|
||||
|
||||
$datesubend = null;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
BIN
htdocs/theme/common/flags/flag-sprite.png
Normal file
BIN
htdocs/theme/common/flags/flag-sprite.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
1279
htdocs/theme/eldy/flags-sprite.inc.php
Normal file
1279
htdocs/theme/eldy/flags-sprite.inc.php
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1068,6 +1068,7 @@ span.fa.fa-plus-circle.paddingleft {
|
|||
/* Themes for badges */
|
||||
|
||||
<?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?>
|
||||
<?php include dol_buildpath($path.'/theme/'.$theme.'/flags-sprite.inc.php', 0); ?>
|
||||
|
||||
.borderrightlight
|
||||
{
|
||||
|
|
|
|||
1279
htdocs/theme/md/flags-sprite.inc.php
Normal file
1279
htdocs/theme/md/flags-sprite.inc.php
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1322,6 +1322,7 @@ span.fa.fa-plus-circle.paddingleft {
|
|||
|
||||
/* Themes for badges */
|
||||
<?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?>
|
||||
<?php include dol_buildpath($path.'/theme/'.$theme.'/flags-sprite.inc.php', 0); ?>
|
||||
|
||||
.borderrightlight
|
||||
{
|
||||
|
|
@ -7959,4 +7960,3 @@ if (is_object($db)) {
|
|||
div.flot-text .flot-tick-label .tickLabel, .fa-color-unset {
|
||||
color: unset;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue