diff --git a/RELEASE b/RELEASE
index 1be3e58a5..cf9cc2833 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-0.5.5 rev 3564
+0.5.5 rev 3570
diff --git a/api/libs/api.userreg.php b/api/libs/api.userreg.php
index 8d8aaea4c..85ef96a1f 100755
--- a/api/libs/api.userreg.php
+++ b/api/libs/api.userreg.php
@@ -319,6 +319,18 @@ function zb_RegPasswordProposal() {
return ($password);
}
+function zb_CheckLoginRscriptdCompat($login) {
+ $maxLen=31;
+ if (strlen($login)>=$maxLen) {
+ $alert=__('Attention generated login longer than').' '.$maxLen.' '.__('bytes').'. '.__('This can lead to the inability to manage this user on remote NAS running rscriptd').'. ';
+ $alert.= __('Perhaps you need to shorten the alias, or use a different model for the generation of logins').'.';
+ $result= wf_modalOpened(__('Warning'), $alert, '500', '200');
+ } else {
+ $result='';
+ }
+ return ($result);
+}
+
function web_UserRegFormNetData($newuser_data) {
$alterconf=rcms_parse_ini_file(CONFIG_PATH."alter.ini");
$safe_mode=$alterconf['SAFE_REGMODE'];
@@ -374,7 +386,7 @@ function web_UserRegFormNetData($newuser_data) {
- '.__('Login').'
+ '.__('Login').' '.zb_CheckLoginRscriptdCompat($login_proposal).'
diff --git a/api/libs/api.workaround.php b/api/libs/api.workaround.php
index 5950a97e6..88981c51f 100755
--- a/api/libs/api.workaround.php
+++ b/api/libs/api.workaround.php
@@ -1668,6 +1668,12 @@ function web_PaymentsShow($query) {
$allcontracts= zb_UserGetAllContracts();
$allcontracts= array_flip($allcontracts);
}
+
+ //getting all users tariffs
+ if ($alter_conf['FINREP_TARIFF']) {
+ $alltariffs= zb_TariffsGetAllUsers();
+ }
+
$total=0;
$totalPaycount=0;
@@ -1682,6 +1688,10 @@ function web_PaymentsShow($query) {
$cells.= wf_TableCell(__('Login'));
$cells.= wf_TableCell(__('Full address'));
$cells.= wf_TableCell(__('Real Name'));
+ //optional tariff display
+ if ($alter_conf['FINREP_TARIFF']) {
+ $cells.=wf_TableCell(__('Tariff'));
+ }
$cells.= wf_TableCell(__('Cash type'));
$cells.= wf_TableCell(__('Notes'));
$cells.= wf_TableCell(__('Admin'));
@@ -1705,6 +1715,10 @@ function web_PaymentsShow($query) {
$cells.= wf_TableCell(wf_Link('?module=userprofile&username='.$eachpayment['login'], (web_profile_icon().' '.$eachpayment['login']), false, ''));
$cells.= wf_TableCell(@$alladrs[$eachpayment['login']]);
$cells.= wf_TableCell(@$allrealnames[$eachpayment['login']]);
+ //optional tariff display
+ if ($alter_conf['FINREP_TARIFF']) {
+ $cells.= wf_TableCell(@$alltariffs[$eachpayment['login']]);
+ }
$cells.= wf_TableCell(@__($alltypes[$eachpayment['cashtypeid']]));
$cells.= wf_TableCell($eachpayment['note']);
$cells.= wf_TableCell($eachpayment['admin']);
diff --git a/config/alter.ini b/config/alter.ini
index e81aa28f3..c94394fcb 100644
--- a/config/alter.ini
+++ b/config/alter.ini
@@ -314,6 +314,8 @@ AUTO_LOGOUT_IDLE=0
;administrator logins for exclude of idle auto logout. comma separated.
AUTO_LOGOUT_EXCLUDE=""
; Is VOLS module enabled?
-VOLS_ENABLED = 1
+VOLS_ENABLED = 0
; is corporate users management enabled?
-CORPS_ENABLED=1
\ No newline at end of file
+CORPS_ENABLED=0
+;finance report and payment search show tariff column
+FINREP_TARIFF=0
\ No newline at end of file
diff --git a/config/optsaltcfg b/config/optsaltcfg
index ce7129588..085a93c3a 100755
--- a/config/optsaltcfg
+++ b/config/optsaltcfg
@@ -93,6 +93,7 @@ UBIM_REFRESH=VARCHAR|Instant messenger refresh timeout in seconds
DEVCON_SQL_KEEP=TRIGGER|Query remains in SQL console after exec
DEVCON_VERBOSE_DEBUG=TRIGGER|Verbose debug data in developers console
FINREP_CONTRACT=TRIGGER|Show users contract in finance report
+FINREP_TARIFF=TRIGGER|Show tariff column in finance report
SIGREP_CONTRACT=TRIGGER|Show users contract in signup report
TARIFFCHGAUTOCREDIT=TRIGGER|Automatically set the credit limit when you change the tariff
MIKROTIK_SUPPORT=TRIGGER|MikroTik extended support enabled
diff --git a/languages/russian/billing.php b/languages/russian/billing.php
index a71383a02..cc6f1b511 100755
--- a/languages/russian/billing.php
+++ b/languages/russian/billing.php
@@ -1701,6 +1701,11 @@
$lang['def']['No existing tax types']='Нету существующих типов налогообложения';
$lang['def']['Corporate users management enabled']='Управление юр. лицами влючено';
$lang['def']['right to manage corps users']='Право управлять юридическими лицами';
-
+$lang['def']['Show tariff column in finance report']='Показывать колонку тарифа в фин. отчете';
+$lang['def']['bytes']='байт';
+$lang['def']['Attention generated login longer than']='Внимание, сгенерированный логин длиннее';
+$lang['def']['This can lead to the inability to manage this user on remote NAS running rscriptd']='Это может привести к невозможности управлять этим пользователем на удаленных NAS под управлением rscriptd';
+$lang['def']['Warning']='Предупреждение';
+$lang['def']['Perhaps you need to shorten the alias, or use a different model for the generation of logins']='Возможно вам стоит укоротить алиасы, либо использовать другую модель генерации логинов';
?>
diff --git a/languages/ukrainian/billing.php b/languages/ukrainian/billing.php
index 50ae4c0c8..b4455343c 100755
--- a/languages/ukrainian/billing.php
+++ b/languages/ukrainian/billing.php
@@ -1714,6 +1714,12 @@
$lang['def']['No existing tax types']='Немає існуючих типів оподаткування';
$lang['def']['Corporate users management enabled']='Керування юр. особами увімкнено';
$lang['def']['right to manage corps users']='Право керувати юридичними особами';
+$lang['def']['Show tariff column in finance report']='Відображати тариф у фінзвіті';
+$lang['def']['bytes']='байт';
+$lang['def']['Attention generated login longer than']='Увага, згенерований логін довший за';
+$lang['def']['This can lead to the inability to manage this user on remote NAS running rscriptd']='Це може призвести, до неможливості керувати віддаленими NAS під управлінням rscriptd';
+$lang['def']['Warning']='Попередження';
+$lang['def']['Perhaps you need to shorten the alias, or use a different model for the generation of logins']='Можливо вам варто скоротити аліаси або ж використовувати іншу модель генерації логінів';
?>
diff --git a/modules/general/openpayz/index.php b/modules/general/openpayz/index.php
index 3dce33486..8d2e58e9d 100755
--- a/modules/general/openpayz/index.php
+++ b/modules/general/openpayz/index.php
@@ -43,6 +43,7 @@ function web_OPDoSearch($year,$month,$paysys) {
$alladdress= zb_AddressGetFulladdresslistCached();
$csvdata='';
$totalsumm=0;
+ $totalcount=0;
$query="SELECT * from `op_transactions` WHERE `date` LIKE '".$year."-".$month."-%' AND `paysys` LIKE '".$paysys."' ;";
$alltransactions=simple_queryall($query);
@@ -78,6 +79,7 @@ function web_OPDoSearch($year,$month,$paysys) {
$rows.= wf_TableRow($cells, 'row3');
if ($eachtransaction['summ']>0) {
$totalsumm=$totalsumm+$eachtransaction['summ'];
+ $totalcount=$totalcount+1;
}
$csvSumm= str_replace('.', ',', $eachtransaction['summ']);
@@ -88,7 +90,7 @@ function web_OPDoSearch($year,$month,$paysys) {
}
$result= wf_TableBody($rows, '100%', '0', 'sortable');
- $result.= wf_tag('b').__('Cash').': '.$totalsumm. wf_tag('b',true);
+ $result.= __('Total').': '.$totalcount.' '.__('payments'). ' '.__('with total amount').' '.$totalsumm;
if (!empty($csvdata)) {
$exportFilename='exports/opsearch_'.$paysys.'_'.$year.'-'.$month.'.csv';
diff --git a/modules/general/payfind/index.php b/modules/general/payfind/index.php
index 236579db2..223d3460c 100755
--- a/modules/general/payfind/index.php
+++ b/modules/general/payfind/index.php
@@ -300,6 +300,9 @@ function web_PaymentSearch($markers) {
$allcontracts = zb_UserGetAllContracts();
$allcontracts = array_flip($allcontracts);
}
+ if ($altercfg['FINREP_TARIFF']) {
+ $alltariffs= zb_TariffsGetAllUsers();
+ }
$allrealnames = zb_UserGetAllRealnames();
$alladdress = zb_AddressGetFulladdresslist();
$alltypes = zb_CashGetAllCashTypes();
@@ -322,6 +325,9 @@ function web_PaymentSearch($markers) {
}
$cells.= wf_TableCell(__('Full address'));
$cells.= wf_TableCell(__('Real Name'));
+ if ($altercfg['FINREP_TARIFF']) {
+ $cells.= wf_TableCell(__('Tariff'));
+ }
$cells.= wf_TableCell(__('Payment type'));
$cells.= wf_TableCell(__('Notes'));
$cells.= wf_TableCell(__('Admin'));
@@ -329,7 +335,12 @@ function web_PaymentSearch($markers) {
if (!empty($allpayments)) {
- $csvdata.=__('ID').';'.__('Date').';'.__('Cash').';'.__('PS%').';'.__('Profit').';'.__('Login').';'.__('Full address').';'.__('Real Name').';'.__('Payment type').';'.__('Notes').';'.__('Admin')."\n";
+ if ($altercfg['FINREP_TARIFF']) {
+ $csvTariffColumn=';'.__('Tariff');
+ } else {
+ $csvTariffColumn='';
+ }
+ $csvdata.=__('ID').';'.__('Date').';'.__('Cash').';'.__('PS%').';'.__('Profit').';'.__('Login').';'.__('Full address').';'.__('Real Name').$csvTariffColumn.';'.__('Payment type').';'.__('Notes').';'.__('Admin')."\n";
foreach ($allpayments as $io => $each) {
$cells = wf_TableCell($each['id']);
$cells.= wf_TableCell($each['date']);
@@ -356,6 +367,13 @@ function web_PaymentSearch($markers) {
@$paymentAddress=$alladdress[$each['login']];;
$cells.= wf_TableCell($paymentAddress);
$cells.= wf_TableCell($paymentRealname);
+ if ($altercfg['FINREP_TARIFF']) {
+ @$userTariff=$alltariffs[$each['login']];
+ $cells.= wf_TableCell($userTariff);
+ $csvTariff=';'.$userTariff;
+ } else {
+ $csvTariff='';
+ }
$cells.= wf_TableCell($paymentCashType);
//payment notes translation
if ($altercfg['TRANSLATE_PAYMENTS_NOTES']) {
@@ -381,7 +399,7 @@ function web_PaymentSearch($markers) {
$profitsumm=$profitsumm+$ourProfit;
}
$csvSumm= str_replace('.', ',', $each['summ']);
- $csvdata.=$each['id'].';'.$each['date'].';'.$csvSumm.';'.$paySysPc.';'.$ourProfit.';'.$each['login'].';'.$paymentAddress.';'.$paymentRealname.';'.$paymentCashType.';'.$paynote.';'.$each['admin']."\n";
+ $csvdata.=$each['id'].';'.$each['date'].';'.$csvSumm.';'.$paySysPc.';'.$ourProfit.';'.$each['login'].';'.$paymentAddress.';'.$paymentRealname.$csvTariff.';'.$paymentCashType.';'.$paynote.';'.$each['admin']."\n";
}
}
diff --git a/userstats/config/modules.d/payments b/userstats/config/modules.d/payments
index 6e196a09f..50fd580bd 100644
--- a/userstats/config/modules.d/payments
+++ b/userstats/config/modules.d/payments
@@ -1,2 +1,2 @@
NAME="Payments"
-NEED=""
+NEED="PAYMENTS_ENABLED"
diff --git a/userstats/config/userstats.ini b/userstats/config/userstats.ini
index ac58e7901..2a6209b24 100755
--- a/userstats/config/userstats.ini
+++ b/userstats/config/userstats.ini
@@ -165,3 +165,6 @@ PAYMENTID_QR=0
;Announcements module is enabled?
AN_ENABLED=0
+
+;Previous payments module is enabled?
+PAYMENTS_ENABLED=1
\ No newline at end of file
diff --git a/userstats/modules/general/payments/index.php b/userstats/modules/general/payments/index.php
index 7e4196d67..2d32afd1d 100755
--- a/userstats/modules/general/payments/index.php
+++ b/userstats/modules/general/payments/index.php
@@ -2,6 +2,7 @@
function zbs_ShowUserPayments($login) {
$usConfig= zbs_LoadConfig();
+ if ($usConfig['PAYMENTS_ENABLED']) {
$allpayments=zbs_CashGetUserPayments($login);
$result='';
@@ -33,6 +34,11 @@ function zbs_ShowUserPayments($login) {
}
$result.='
';
show_window(__('Last payments'),$result);
+ } else {
+ $result=__('This module is disabled');
+ show_window(__('Sorry'),$result);
+ }
+
}
$user_ip=zbs_UserDetectIp('debug');