mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Gestione permessi segmenti e numerazione documenti
This commit is contained in:
@@ -208,3 +208,19 @@ function parseScontoCombinato($combinato)
|
||||
|
||||
return (1 - $result) * 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* Funzione che gestisce il parsing di uno sconto combinato e la relativa trasformazione in sconto fisso.
|
||||
* Esempio: (40 + 10) % = 44 %.
|
||||
*
|
||||
* @param $combinato
|
||||
*
|
||||
* @return float|int
|
||||
*/
|
||||
function getSegmentPredefined($id_module)
|
||||
{
|
||||
$id_segment = database()->selectOne('zz_segments', 'id', ['id_module' => $id_module, 'predefined' => 1])['id'];
|
||||
|
||||
return $id_segment;
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +341,10 @@ function redirectOperation($id_module, $id_record)
|
||||
*/
|
||||
function prepareToField($string)
|
||||
{
|
||||
return str_replace('"', '"', $string);
|
||||
$string = str_replace('"', '"', $string);
|
||||
$string = str_replace('"', '"', $string);
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user