go(
"SELECT codice_catastale_comune FROM b_codici_catastali WHERE denominazione LIKE :citta",
[":citta" => $citta]
)->fetch(PDO::FETCH_COLUMN,0);
}
return $r;
}
public static function translateTipoPU(string $ruolo) : int {
$r = 0;
if (!empty($ruolo)) {
if ($ruolo == "notaio") {
$r = 1; //notaio
} else if ($ruolo == "segretario generale" || $ruolo == "ufficiale rogante") {
$r = 2; //altro pubblico ufficiale
} else if ($ruolo == "altro soggetto") {
$r = 9; //altro soggetto
}
}
return $r;
}
public static function getUfficiEntrate() : array {
global $pdo;
$all = $pdo->go("SELECT codice_ufficio, denominazione FROM b_conf_uffici_entrate")->fetchAll(PDO::FETCH_ASSOC);
$ordered = [];
foreach($all as $uff) {
$ordered = array_merge($ordered,[$uff["codice_ufficio"] => $uff["denominazione"]]);
}
return $ordered;
}
}
class UnimodForm {
private $contratto = null;
private $hidden = false;
private $rel = "";
private $attribute = false;
private $ignore_chain = false;
private $soggetti = [];
private $fix_keys = [
"CodiceFiscalePu" => "CodiceFiscalePU",
"TipoPu" => "TipoPU",
"DenominazionePu" => "DenominazionePU",
"LsDenominazionePu" => "LSDenominazionePU",
"LsIndirizzo" => "LSIndirizzo",
"CodiceIban" => "CodiceIBAN",
"SoggettoIva" => "SoggettoIVA",
"LsDenominazione" => "LSDenominazione",
"LsNome" => "LSNome",
"LsCognome" => "LSCognome",
"Soggettof" => "SoggettoF",
"Indirizzoanagrafico" => "IndirizzoAnagrafico"
];
public $data = [];
private $debug = false;
const BASE_DATA = [
"telematico" => [
"dati-telematico" => [
"chiave-file" => [
"_attributes" => [
"controllo" => "TUTTOGARE v3.0",
]
]
]
]
];
public function __construct(?object $contratto = null)
{
global $pdo;
$this->chain = [];
$this->contratto = $contratto;
$this->data = json_decode($contratto->info["unimod_data"] ?? "{}",true);
$this->codici_catastali = $pdo->go("SELECT codice_catastale_comune, denominazione FROM b_codici_catastali ORDER BY denominazione")->fetchAll(PDO::FETCH_KEY_PAIR);
if (empty($this->data)) {
$this->data = self::BASE_DATA;
}
if (!empty($contratto)){
$contraenti = $contratto->getContraenti("oe");
//Pagamento Telematico
$ente = $_SESSION["utente"]->getEntiBeneficiari()[$contratto->info["codice_ente"]] ?? [];
if (!empty($ente)) {
if (empty($this->get("telematico.dati-telematico.pagamento-telematico._attributes.codice_fiscale_studio"))) {
$this->set("telematico.dati-telematico.pagamento-telematico._attributes.codice_fiscale_studio", $ente["cf"] ?? "");
}
$e_contraente = [
"cf" => $ente["cf"],
"denominazione" => $ente["denominazione"]
];
$rapp_legale = $contratto->getContraenti("ore");
if (!empty($rapp_legale)) {
if (empty($rapp_legale[0]["extraInfo"]["cf"]) && !empty($rapp_legale[0]["cf"])) {
$rapp_legale[0]["extraInfo"]["cf"] = $rapp_legale[0]["cf"];
}
$e_contraente["extraInfo"] = $rapp_legale[0]["extraInfo"];
}
$contraenti = array_merge([$e_contraente],$contraenti);
}
foreach( $contraenti as $i => $contraente) {
$_i = $i + 1;
$raw_id = "000000" . $_i;
$raw_id = substr($raw_id, strlen((string) $_i));
$id_soggetto = $raw_id;
$id_altro_soggetto = $raw_id;
$this->soggetti["S".$id_soggetto] = $contraente["denominazione"];
$this->set("telematico.dati-telematico.adempimento.dati-negozio._attributes.id_negozio","000001");
if (!empty($id_soggetto)) $this->set("telematico.dati-telematico.adempimento.£.dati-soggetto.{$i}._attributes.id_soggetto", $id_soggetto);
if (!empty($id_altro_soggetto)) $this->set("telematico.dati-telematico.adempimento.£.dati-soggetto.{$i}._attributes.id_altro_soggetto", $id_altro_soggetto);
if (!empty($contraente["denominazione"])) $this->set("telematico.dati-telematico.adempimento.£.dati-soggetto.{$i}.soggetto-n._attributes.denominazione", $contraente["denominazione"]);
if (!empty($contraente["cf"])) $this->set("telematico.dati-telematico.adempimento.£.dati-soggetto.{$i}.soggetto-n._attributes.codice_fiscale", $contraente["cf"]);
if (!empty($contraente["extraInfo"])) {
if (!empty($id_altro_soggetto)) $this->set("telematico.dati-telematico.adempimento.£.dati-altro-soggetto.{$i}._attributes.id_altro_soggetto", $id_altro_soggetto);
if (!empty($contraente["extraInfo"]["codiceFiscale"] ?? $contraente["extraInfo"]["cf"] ?? null)) $this->set("telematico.dati-telematico.adempimento.£.dati-altro-soggetto.{$i}.soggettof._attributes.codice_fiscale", $contraente["extraInfo"]["codiceFiscale"] ?? $contraente["extraInfo"]["cf"] ?? null);
if (!empty($contraente["extraInfo"]["nome"])) $this->set("telematico.dati-telematico.adempimento.£.dati-altro-soggetto.{$i}.soggettof._attributes.nome", $contraente["extraInfo"]["nome"]);
if (!empty($contraente["extraInfo"]["cognome"])) $this->set("telematico.dati-telematico.adempimento.£.dati-altro-soggetto.{$i}.soggettof._attributes.cognome", $contraente["extraInfo"]["cognome"]);
if (!empty($contraente["extraInfo"]["dataNascita"])) $this->set("telematico.dati-telematico.adempimento.£.dati-altro-soggetto.{$i}.soggettof._attributes.data_nascita", $contraente["extraInfo"]["dataNascita"]);
if (!empty($contraente["extraInfo"]["provincia"])) $this->set("telematico.dati-telematico.adempimento.£.dati-altro-soggetto.{$i}.residenza.indirizzoanagrafico._attributes.provincia", $contraente["extraInfo"]["provincia"]);
if (!empty($contraente["extraInfo"]["cap"])) $this->set("telematico.dati-telematico.adempimento.£.dati-altro-soggetto.{$i}.residenza.indirizzoanagrafico._attributes.cap", $contraente["extraInfo"]["cap"]);
if (!empty($contraente["extraInfo"]["pec"])) $this->set("telematico.dati-telematico.adempimento.£.dati-altro-soggetto.{$i}.residenza.indirizzoanagrafico._attributes.indirizzoemail", $contraente["extraInfo"]["pec"]);
}
}
//Chiave File
$this->set("telematico.dati-telematico.chiave-file._attributes.progressivo_invio", $this->contratto->info["codice"] ?? 0);
$puff = $contratto->getContraenti("uff");
if (is_array($puff)){
$puff = $puff[0];
}
if (!empty($puff)){
if(!empty($puff["cf"])) $this->set("telematico.dati-telematico.chiave-file.codice-fiscale-pu._value", $puff["cf"] ?? "");
if(!empty($puff["denominazione"])) $this->set("telematico.dati-telematico.chiave-file.pubblico-ufficiale._attributes.denominazione_pu", $puff["denominazione"]);
if(!empty($puff["extraInfo"]["indirizzo"])) $this->set("telematico.dati-telematico.chiave-file.pubblico-ufficiale._attributes.indirizzo", $puff["extraInfo"]["indirizzo"]);
if(!empty($puff["extraInfo"]["cap"])) $this->set("telematico.dati-telematico.chiave-file.pubblico-ufficiale._attributes.cap", $puff["extraInfo"]["cap"]);
if(!empty($puff["extraInfo"]["citta"])) $this->set("telematico.dati-telematico.chiave-file.pubblico-ufficiale._attributes.codice_comune", UnimodUtils::cittaToBelfiore($puff["extraInfo"]["citta"]));
if(!empty($puff["ruolo"])) $this->set("telematico.dati-telematico.chiave-file.pubblico-ufficiale._attributes.tipo_pu", UnimodUtils::translateTipoPU($puff["ruolo"]));
//Adempimento
if(!empty($puff["cf"]) && empty($this->get("telematico.dati-telematico.adempimento.chiave-adempimento.codice-fiscale-pu._value"))) {
$this->set("telematico.dati-telematico.adempimento.chiave-adempimento.codice-fiscale-pu._value", $puff["cf"] ?? "");
}
if(!empty($puff["extraInfo"]["indirizzo"]) && empty($this->get("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.indirizzo"))){
$this->set("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.indirizzo", $puff["extraInfo"]["indirizzo"]);
}
if(!empty($puff["extraInfo"]["cap"]) && empty($this->get("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.cap"))) {
$this->set("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.cap", $puff["extraInfo"]["cap"]);
}
if(!empty($puff["extraInfo"]["citta"]) && empty($this->get("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.codice_comune"))) {
$this->set("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.codice_comune", UnimodUtils::cittaToBelfiore($puff["extraInfo"]["citta"]));
}
if(!empty($puff["ruolo"]) && empty($this->get("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.tipo_pu"))){
$this->set("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.tipo_pu", UnimodUtils::translateTipoPU($puff["ruolo"]));
}
if(!empty($puff["denominazione"]) && empty($this->get("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.denominazione_pu"))){
$this->set("telematico.dati-telematico.adempimento.chiave-adempimento.pubblico-ufficiale._attributes.denominazione_pu", $puff["denominazione"]);
}
}
if(!empty($contratto->info["importo_totale"])) $this->set("telematico.dati-telematico.adempimento.dati-negozio._attributes.valore_negozio", $contratto->info["importo_totale"]);
$this->set("telematico.dati-telematico.adempimento.dati-negozio.negozio._attributes.codice_negozio","7003");
$this->set("telematico.dati-telematico.adempimento.dati-negozio.negozio.£.tassazione.r-0._attributes.codice_tributo","9814");
$this->set("telematico.dati-telematico.adempimento.dati-negozio.negozio.£.tassazione.r-1._attributes.codice_tributo","9802");
$allegati = $contratto->getAllegati();
foreach ($allegati as $i => $a) {
$this->set("telematico.dati-telematico.adempimento.dati-titolo.£.allegati.r-{$i}._attributes.codice_allegato",99);
$this->set("telematico.dati-telematico.adempimento.dati-titolo.£.allegati.r-{$i}._attributes.numero_allegati",1);
$this->set("telematico.dati-telematico.adempimento.dati-titolo.£.allegati.r-{$i}._attributes.descrizione",$a["titolo"]);
}
}
}
public function translate(string $str) : string {
$matches = [];
preg_match('/IDREFS attribute (\w+) .* ["](\w+)["]/m', $str, $matches);
if (count($matches) > 1) {
$k = $matches[1];
$k = implode(" ",array_filter(preg_split('/(?=[A-Z])/',$k),function($p){
return !empty($p);
}));
$v = $matches[2];
return "Il valore {$v} non è valido per il campo \"{$k}\"";
}
return $str;
}
private function _debug(string $name) : void {
if ($this->debug) {
?>
=$name?>
}
}
#region Data
public function save() : bool {
$data = UnimodUtils::getRawPostData();
unset($data["token"]);
unset($data["codice"]);
$this->data = self::BASE_DATA;
foreach ($data as $k => $v) {
$this->set($k, $v);
}
$this->set(
"telematico.dati-telematico.adempimento.dati-negozio.negozio.imponibili._attributes.registro",
str_replace(".","",$this->get("telematico.dati-telematico.adempimento.dati-negozio._attributes.valore_negozio") ?? "")
);
$this->set("telematico.dati-telematico.adempimento.dati-negozio.negozio._attributes.immobile_strumentale", "0");
$testo_libero = $this->get("telematico.dati-telematico.adempimento.testo-atto.testo_libero");
$testo_libero = html_entity_decode($testo_libero, ENT_QUOTES, 'UTF-8');
$testo_libero = strip_tags($testo_libero);
$testo_libero = str_replace('"',"'", $testo_libero);
$testo_libero = mb_convert_encoding($testo_libero, "UTF-8", "auto");
$testo_libero = iconv('UTF-8', 'ASCII//TRANSLIT', $testo_libero);
$testo_libero = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $testo_libero);
$testo_libero = strtoupper($testo_libero);
$this->set(
"telematico.dati-telematico.adempimento.testo-atto.testo_libero",
$testo_libero
);
$json = json_encode($this->data);
if ($json === false) {
return false;
}
if ($this->contratto->saveUnimodData($json)) {
$this->fixArrayForXML($this->data);
$data_with_header = $this->data;
$data_with_header["!DOCTYPE"] =
$xml = \Spatie\ArrayToXml\ArrayToXml::convert(
$this->data['Telematico'],
'Telematico',
false,
"ISO-8859-1",
"1.0",
["formatOutput" => true]
);
$dom = new DOMDocument();
$dom->loadXML($xml);
$imp = new DOMImplementation;
$f_dtd = $imp->createDocumentType('Telematico','', 'Unico18012016.dtd');
$f = $imp->createDocument(null,"",$f_dtd);
$f->encoding = "ISO-8859-1";
$oldNode = $dom->getElementsByTagName("Telematico")->item(0);
$newNode = $f->importNode($oldNode, true);
$f->appendChild($newNode);
$dtd = file_get_contents("./Unico18012016.dtd");
$root = "Telematico";
$systemId = 'data://text/plain;base64,'.base64_encode($dtd);
$creator = new DOMImplementation;
$doctype = $creator->createDocumentType($root, "", $systemId);
$new = $creator->createDocument(null,"",$doctype);
$new->encoding = "utf-8";
$oldNode = $dom->getElementsByTagName($root)->item(0);
$newNode = $new->importNode($oldNode, true);
$new->appendChild($newNode);
libxml_use_internal_errors(true);
libxml_clear_errors();
$new->validate();
$_SESSION["unimod-errors"] = [];
if (count(libxml_get_errors()) > 0) {
$_SESSION['unimod-errors'] = libxml_get_errors();
}
$this->contratto->saveUnimodXML($f->saveXML());
}
return empty($_SESSION["unimod-errors"] ?? []);
}
private function convert($value, $key) {
if ($value == "on") {
return 1;
} else if ($value == "off") {
return 0;
}
$prefixes = [
"IdNegozio" => "N",
//"IdNegozioPermuta" => "N",
"IdSoggetto" => "S",
"IdAltroSoggetto" => "SR"
];
if (!empty($prefixes[$key]) && !empty($value)) {
return $prefixes[$key] . $value;
}
return $value;
}
private function fixArrayForXML(&$data) {
$base = [
"telematico.dati-telematico.adempimento.dati-titolo._attributes.tipo_bollo" => "0",
"telematico.dati-telematico.adempimento.dati-negozio.negozio.info-tassazione._attributes.esente" => "0",
"telematico.dati-telematico.adempimento.dati-negozio.negozio.info-tassazione._attributes.soggetto_iva" => "0",
"telematico.dati-telematico.adempimento.dati-negozio.negozio.info-tassazione._attributes.effetti_sospesi" => "0",
"telematico.dati-telematico.adempimento.dati-negozio.negozio._attributes.garanzia_per_debito_non_proprio" => "0",
"telematico.dati-telematico.adempimento.dati-negozio.negozio.imponibili._attributes.registro" => "0",
"telematico.dati-telematico.adempimento.dati-titolo.titolo._attributes.atto_esente_registrazione" => "0",
];
$nullables = [
//"IdNegozioPermuta",
"LSDenominazionePU",
"LSIndirizzo",
"CodiceFiscaleStudio",
"CodUfficioEntratePrecedente",
"AnnoSucc",
"IdAltroSoggetto",
"Sesso",
"Aliquota",
"Sede",
"Provincia",
"ComuneNascita",
"DataNascita"
];
foreach ($base as $c => $v) {
if (empty($this->get($c))) {
$this->set($c, $v);
}
}
if (is_array($data)) {
foreach ($data as $k => $d) {
if (isset($data[$k]["£"])) {
foreach (array_keys($data[$k]["£"]) as $key) {
$content = [];
foreach ($data[$k]["£"][$key] as $c) {
$content[] = $c;
}
$data[$k][$key] = $content;
}
unset($data[$k]["£"]);
}
if (!is_numeric($k) && !in_array($k, ["_value","_attributes"])) {
$new_key = str_replace(" ","",ucwords(str_replace(["-","_"]," ",$k)));
if (in_array($new_key, array_keys($this->fix_keys))) {
$new_key = $this->fix_keys[$new_key];
}
if ($new_key == "DatiAltroSoggetto") {
foreach ($data[$k] as &$content) {
if (empty($content["_attributes"]["tipo_altro_soggetto"])) {
$content["_attributes"]["tipo_altro_soggetto"] = "2";
} else if (!empty($content["_attributes"]["tipo_altro_soggetto"])) {
$content["_attributes"]["tipo_altro_soggetto"] = 0;
}
}
}
if ($new_key == "Residenza") {
if (!empty($data[$k])) {
if (empty($data[$k]["_attributes"]["tipo_domicilio"])) {
$data[$k]["_attributes"]["tipo_domicilio"] = "0";
}
}
}
if (!in_array($new_key,$nullables) || isset($data[$k]) && !empty($data[$k])) {
if ($new_key == "DataAtto" || $new_key == "DataNascita") {
$data[$k] = str_replace("/","",$data[$k]);
}
//riordina le chiavi di adempimento
if ($new_key == "Adempimento") {
$data[$k] = [
"chiave-adempimento" => $data[$k]["chiave-adempimento"] ?? [],
"dati-titolo" => $data[$k]["dati-titolo"] ?? [],
"dati-soggetto" => $data[$k]["dati-soggetto"] ?? [],
"dati-altro-soggetto" => $data[$k]["dati-altro-soggetto"] ?? [],
"dati-negozio" => $data[$k]["dati-negozio"] ?? [],
"testo-atto" => $data[$k]["testo-atto"] ?? []
];
}
if ($new_key == "Negozio") {
if (isset($data[$k]["soggetti"])) {
$avente_causa = [];
$dante_causa = [];
foreach($data[$k]["soggetti"] as $i => $s) {
$raw_id = "000000" . ($i + 1);
$raw_id = "S" . substr($raw_id, strlen((string) $i));
if (!empty($s["_attributes"]["id_soggetto_dante_causa"])) {
$dante_causa[] = $raw_id;
}
if (!empty($s["_attributes"]["id_soggetto_avente_causa"])) {
$avente_causa[] = $raw_id;
}
}
unset($data[$k]["soggetti"]);
if (!empty($avente_causa)) {
$data[$k]["_attributes"]["id_soggetto_avente_causa"] = implode(" ",$avente_causa);
}
if (!empty($dante_causa)) {
$data[$k]["_attributes"]["id_soggetto_dante_causa"] = implode(" ",$dante_causa);
}
}
$data[$k] = [
"imponibili" => $data[$k]["imponibili"] ?? [],
"agevolazione" => $data[$k]["agevolazione"] ?? [],
"info-tassazione" => $data[$k]["info-tassazione"] ?? [],
"tassazione" => $data[$k]["tassazione"] ?? [],
"_attributes" => $data[$k]["_attributes"] ?? []
];
}
if ($new_key == "ValoreNegozio" || $new_key == "Importo" || $new_key == "Aliquota") {
if (strpos($data[$k],".") === false) {
$data[$k] .= "00";
}
$data[$k] = str_replace([",","."],"",$data[$k]);
}
$data[$new_key] = self::convert($data[$k], $new_key);
if (in_array($new_key,["LSDenominazione", "LSNome", "LSCognome"]) && empty($value)) {
unset($data[$new_key]);
}
if (in_array($new_key, ["ImmobileStrumentale"])) {
unset($data[$new_key]);
}
}
unset($data[$k]);
$k = $new_key;
}
if (!empty($data[$k])) {
if (is_string($data[$k])) {
$data[$k] = mb_convert_encoding($data[$k], "UTF-8", "auto");
$data[$k] = preg_replace("/[^a-zA-Z0-9\/_|+ -.@]/", '', $data[$k]);
}
$this->fixArrayForXML($data[$k]);
}
}
}
}
public function set(string $path, $value) {
$d = &$this->data;
$path = explode(".",$path);
foreach ($path as $i => $p) {
if (!is_array($d) || !array_key_exists($p, $d)) {
$d[$p] = [];
}
$d = &$d[$p];
}
$d = $value;
}
public function get(string $path, ?array $data = null, bool $safe = true) {
$current_layer = $data;
if (empty($current_layer)) {
$current_layer = $this->data;
}
$path = explode(".",$path);
foreach ($path as $k) {
if (isset($current_layer[$k]) && $k != "V") {
$current_layer = $current_layer[$k];
} else if (isset($current_layer[$k]) && $k == "V") {
return $current_layer[$k];
}
}
if (!$safe || !is_array($current_layer)) {
return $current_layer;
}
return null;
}
public function ignoreChain($callable) : void {
$this->ignore_chain = true;
$callable();
$this->ignore_chain = false;
}
public function add(string $path, string $id, string $container_identifier, string $method) : void {
$this->chain = explode(".",$path);
$this->deferredElement($id, $container_identifier, function() use ($method){
//$this->ignoreChain(function() use ($method){
$this->{$method}();
//});
}, false);
}
private function attribute(callable $callable) {
$this->attribute = true;
$callable();
$this->attribute = false;
}
private function rel(callable $callable, string $rel) : void {
$this->rel = $rel;
$callable();
$this->rel = "";
}
#endregion
#region UI
public function form() {
?>
}
private function row(callable $callable) : void {
?>
$callable();
?>
}
private function title(string $title) : void {
?>
=$title?>
}
private function head(string $title, bool $hidden = false, ?string $rule = null, ?string $method = null, ?string $add_btn_title = "", ?array $data = null) : void {
//TODO: se l'hidden è true
//non stampare la card, ma limitati ad estendere il name degli input
if (!$this->ignore_chain) {
$this->chain[] = strpos($title, "£") !== false ? $title : sanitize_string($title);
}
if (!$hidden) {
?>
}?>
chain);
?>
$identifier = str_replace(".","-",uniqid(sanitize_string($title) . "-"));
?>
$content) {
$this->add("{$chain}.{$id}", $id, $identifier, $method);
}
}?>
get($chain))){
#TODO: l'identificativo in questo caso è l'id della risorsa nel database, o se vuoto i_0
$this->add($chain, ".r-" . uniqid(), $identifier, $method);
}?>
}?>
}
private function tail(bool $hidden = false) : void {
if (!$this->ignore_chain) {
array_pop($this->chain);
if((array_slice($this->chain,count($this->chain) - 2)[0] ?? null) === "£") {
array_pop($this->chain);
}
}
if (!$hidden) {
?>
}
}
private function mandatory() : string {
if (!empty($this->rel) && $this->rel[0] == "S") {
return "*";
}
return "";
}
private function hidden(callable $callable) : void {
$this->hidden = true;
$callable();
$this->hidden = false;
}
private function cardContainer(callable $callable) {
?>
$callable()?>
}
public function section(string $callable, string $title, string $rule, bool $hidden = false, string $add_btn_title = "Aggiungi") {
?>
$current = $this->get(implode(".",$this->chain), null, false);
$this->head('£', true);
$this->head(sanitize_string($title), $hidden, $rule, $callable, $add_btn_title, $current["£"][sanitize_string($title)] ?? null);
$this->tail($hidden);
$this->tail(true);
?>
}
private function navlink(string $sid, string $title, bool $selected = false) : void {
?>
=$title?>
}
private function tabpane(string $sid, string $title, callable $content, bool $active = false) : void {
?>
$content();?>
}
private function frame(callable $callable) {
?>
$callable();
?>
}
public function deferredElement(string $id, string $container_identifier, callable $callable, bool $deletable = false) : void {
?>
}
#endregion
#region elements
private function codiceFiscalePU() : void {
//
$this->head("Codice Fiscale PU", true);
$this->rel(function(){
$this->text("Codice Fiscale Pubblico Ufficiale", "_value");
}, "S;11;16;A");
$this->tail(true);
}
public function telematico() : void {
//
$this->head("Telematico", true);
$this->datiTelematico();
$this->tail(true);
}
public function datiTelematico() : void {
//
//
$this->head("Dati Telematico", true);
$this->cardContainer(function(){
?>
$this->attribute(function(){
$this->rel(function() {
$this->codUfficioEntrate();
},"S;3;3;A");
});
});
$this->cardContainer(function(){
$this->chiaveFile();
});
$this->cardContainer(function(){
$this->pagamentoTelematico();
});
//$this->variableSection([
// "Compensazione Credito" => "compensazioneCredito",
// "Integrazione Debito" => "integrazioneDebito"
//]);
//$this->variableSection([
// "Adempimento" => "adempimento",
// "Instanza Voltura" => "instanzaVoltura"
//]);
$this->cardContainer(function(){
$this->adempimento();
});
$this->tail(true);
}
public function chiaveFile() : void {
//
//
$this->head("Chiave File");
$this->row(function(){
$this->codiceFiscalePU();
$this->pubblicoUfficiale();
//$this->richiedenteVoltura();
});
$this->attribute(function(){
$this->hidden(function(){
$this->progressivoInvio();
$this->controllo();
});
});
$this->tail();
}
public function pubblicoUfficiale() : void {
//
//
//
$this->head("Pubblico Ufficiale", true);
$this->attribute(function(){
$this->rel(function(){
$this->codiceComune();
},"S;4;4;A");
$this->rel(function(){
$this->denominazionePU();
},"S;2;50;A");
$this->rel(function(){
$this->indirizzo();
},"S;2;50;A");
$this->rel(function(){
$this->tipoPU();
},"S;1;1;N");
$this->rel(function(){
$this->lsDenominazionePU();
},"N;2;50;A");
$this->rel(function(){
$this->lsInidirizzo();
},"N;2;50;A");
//$this->rel(function(){
// $this->cap();
//},"N;5;5;N");
});
$this->tail(true);
}
public function richiedenteVoltura() : void {
//
//
$this->head("Richiedente Voltura");
$this->file();
$this->tipoRichiedente();
$this->indirizzoEMail();
$this->recapitoTelefonico();
$this->tipoDocumento();
$this->numeroDocumento();
$this->dataRilascioDocumento();
$this->dataScadenzaDocumento();
$this->codiceFiscaleSocieta();
$this->tail();
}
private function file() : void {
#TODO: i file devono essere caricati in base64
}
public function pagamentoTelematico() : void {
//
//
$this->head("Pagamento Telematico");
$this->row(function(){
$this->attribute(function(){
$this->rel(function(){
$this->codiceFiscale("Codice Fiscale Persona Fisica");
},"S;16;16;A");
$this->rel(function(){
$this->codiceFiscaleStudio("Codice Fiscale Persona Giuridica");
},"S;11;16;A");
$this->rel(function(){
$this->iban();
},"S;27;27;A");
});
});
$this->tail();
}
public function allegati() : void {
//
//
$this->attribute(function(){
$this->hidden(function(){
$this->codiceAllegato();
});
$this->rel(function(){
$this->numeroAllegati();
}, "S;1;2;N");
$this->rel(function(){
$this->descrizione();
},"S;2;50;A");
});
}
public function adempimento() : void {
//
$this->head("Adempimento");
$sid = uniqid();
?>
$this->tabpane($sid,"Chiave Adempimento",function(){
$this->chiaveAdempimento();
}, true);
$this->tabpane($sid,"Dati Titolo",function() {
$this->datiTitolo();
});
$this->tabpane($sid,"Dati Soggetto",function() {
$this->section("datiSoggetto", "Dati Soggetto", "*", true, "Aggiungi Soggetto");
});
$this->tabpane($sid,"Dati Altro Soggetto", function(){
$this->section("datiAltroSoggetto", "Dati Altro Soggetto", "*", true, "Aggiungi Soggetto");
});
$this->tabpane($sid,"Dati Negozio", function(){
$this->datiNegozio();
//$this->row(function(){
// $this->section("datiNegozio", "Dati Negozio", "*");
//});
});
$this->tabpane($sid,"Testo Atto", function(){
$this->testoAtto();
});
?>
//$this->section("datiConvenzione","Dati Convenzione", "*");
//$this->datiTavolare();
//$this->section("datiVolturaCatastale", "Dati Voltura Catastale", "*");
//$this->section("datiImmobile", "Dati Immobile", "*");
//$this->section("datiSoggetto", "Dati Soggetto", "*");
//$this->section("datiConiugeNonComparente", "DatiConiugeNonComparente", "*");
//$this->section("datiSoggettoNonComparente", "DatiSoggettoNonComparente", "*");
//$this->section("datiAltroSoggetto", "DatiAltroSoggetto", "*");
//$this->section("datiNegozio", "DatiNegozio", "*");
//$this->section("datiOpzione496","DatiOpzione496","*");
//$this->section("datiMediatore","DatiMediatore","*");
//$this->section("datiCessione","DatiCessione","*");
//$this->testoAtto();
//$this->titoloDigitale();
$this->tail();
}
private function testoAtto() : void {
//
$this->head("Testo Atto", true);
$this->row(function(){
$this->frame(function(){
$this->rel(function(){
$this->testoLibero();
},"S;2;0;A");
});
});
$this->row(function(){
$this->hidden(function(){
$this->rel(function(){
$this->primoNumeroRepertorio();
},"S;1;7;A");
$this->rel(function(){
$this->secondoNumeroRepertorio();
},"N;1;5;A");
});
});
$this->tail(true);
}
private function datiNegozio() : void {
//
//
$this->head("Dati Negozio", true);
$this->row(function(){
$this->attribute(function(){
$this->hidden(function(){
$this->idNegozio();
});
// $this->rel(function(){
// $this->idNegozioPermuta();
// },"N;6;6,N");
$this->rel(function(){
$this->valoreNegozio();
},"S;0;13;N");
//$this->annotazioni();
});
});
//$this->section("negozio","Negozio","+",true);
$this->negozio();
$this->tail(true);
}
private function negozio() : void {
//
//
$sid = uniqid();
$this->head("Negozio", true);
?>
$this->tabpane($sid,"Info Negozio", function(){
$this->row(function(){
$this->attribute(function(){
$this->garanziaPerDebitoNonProprio();
$this->head("£",true);
foreach ($this->data["telematico"]["dati-telematico"]["adempimento"]["£"]["dati-soggetto"] as $i => $s) {
$this->head("soggetti.{$i}",true);
$this->frame(function() use ($s){
$this->title($s["soggetto-n"]["_attributes"]["denominazione"] ?? "");
$this->idSoggettoAventeCausa();
$this->idSoggettoDanteCausa();
});
$this->tail(true);
}
$this->tail(true);
$this->rel(function(){
$this->codiceNegozio();
},"S;4;4;N");
//$this->immobileStrumentale();
});
});
},true);
$this->tabpane($sid,"Informazioni sulla Tassazione", function(){
//$this->imponibili();
$this->title("Agevolazione");
$this->agevolazione();
$this->title("Info Tassazione");
$this->infoTassazione();
});
$this->tabpane($sid,"Tassazioni", function(){
//$this->section("tassazione","Tassazione","*", true);
$this->head("£.tassazione.r-0",true);
$this->frame(function(){
$this->tassazione("Imposta registro atti Contr. e Denunc.");
});
$this->tail(true);
$this->head("£.tassazione.r-1",true);
$this->frame(function(){
$this->tassazione("Imposta di bollo versata da ufficiali roganti");
});
$this->tail(true);
})
?>
$this->tail(true);
}
private function tassazione(?string $nome_tassa = null) : void {
//
//
$this->attribute(function() use ($nome_tassa){
$this->hidden(function() {
$this->codiceTributo();
});
// $this->rel(function(){
// $this->aliquota();
// },"S;1;5;N");
$this->rel(function() use ($nome_tassa){
$this->importo($nome_tassa);
},"S;0;14;N");
});
}
private function imponibili() : void {
//
//
$this->head("Imponibili", true);
$this->row(function(){
$this->title("Imponibili");
$this->attribute(function(){
$this->registro();
//$this->ipocatastale();
});
});
$this->tail(true);
}
private function infoTassazione() : void {
//
//
$this->head("Info Tassazione", true);
$this->row(function(){
$this->attribute(function() {
$this->esente();
$this->soggettoIVA();
$this->effettiSospesi();
});
});
$this->tail(true);
}
private function datiAltroSoggetto() : void {
//
//
//$this->variableSection([
// "SoggettoF" => "soggettoF",
// "SoggettoN" => "soggettoN"
//]);
//$this->head("Dati Altro Soggetto",true);
$this->soggettoF();
$this->title("Residenza");
$this->residenza();
$this->attribute(function(){
$this->hidden(function(){
$this->idAltroSoggetto();
});
$this->rel(function(){
$this->qualifica();
},"S;1;8;N");
$this->tipoAltroSoggetto();
});
//$this->tail(true);
}
private function datiConiugeNonComparente() : void {
//
//
$this->head("Dati Coniuge Non Comparente");
$this->soggettoF();
$this->textWithPrepend([
"title" => "Id Coniuge Non Comparente",
"name" => "id_coniuge_non_comparente",
"prefix" => "CN",
"rel" => "S;6;6;N"
]);
$this->tail();
}
private function soggettoF() : void {
//
//
$this->head("SoggettoF", true);
$this->attribute(function(){
$this->rel(function(){
$this->codiceFiscale(null);
},"S;11;16;A");
$this->rel(function(){
$this->cognome(false);
},"S;2;80;A");
$this->rel(function(){
$this->lsCognome();
},"N;2;50;A");
$this->dataNascita();
$this->rel(function(){
$this->nome(false);
},"S;2;50;A");
$this->rel(function(){
$this->lsNome();
},"N;2;50;A");
// $this->rel(function(){
// $this->sesso();
// },"N;1;1;A");
$this->rel(function(){
$this->comuneNascita();
},"N;2;50;A");
$this->rel(function(){
$this->provincia();
},"N;2;2;A");
});
$this->tail(true);
}
private function soggettoN() : void {
//
//
$this->head("Soggetto N", true);
$this->attribute(function(){
$this->codiceFiscale(null);
$this->denominazione();
$this->sede();
$this->provincia();
$this->lsDenominazione();
});
//$this->sedeTavolare();
//$this->LSSedeTavolare();
$this->tail(true);
}
private function datiSoggetto() : void {
//
//
//$this->domicilioEletto();
$this->soggettoN();
//$this->frame(function(){
// $this->title("Residenza");
// $this->residenza();
//});
//$this->variableSection([
// "Soggetto F" => "soggettoF",
// "Soggetto N" => "soggettoN"
//]);
$this->attribute(function(){
$this->hidden(function(){
$this->idAltroSoggetto();
$this->idSoggetto();
});
});
}
private function unitaNegoziali() {
//
//
$this->head("Unità Negoziali");
$this->idUnitaNegoziale();
$this->idImmobile();
$this->tail();
}
private function volturaInfoAttoNotarile() {
//
$this->head("Voltura Info AttoNotarile");
$this->primoNumeroRepertorio();
$this->secondoNumeroRepertorio();
$this->data();
$this->rogante();
$this->descrizione();
$this->tail();
}
private function volturaInfoAtto() {
//
$this->head("Voltura Info Atto");
$this->primoNumeroRepertorio();
$this->secondoNumeroRepertorio();
$this->dataAtto();
$this->rogante();
$this->descrizione();
$this->tail();
}
private function ulterioriInfo() : void {
//
$this->head("Informazioni Ulteriori");
$this->section("descrizione","Descrizione","+");
$this->tail();
}
private function identificativiInfo() : void {
//
$this->head("Informazioni Identificativi", false, "", true);
$this->section("descrizione","Descrizione","+");
$this->tail();
}
private function datiConvenzione() : void {
//
//
$this->head("Dati Convenzione");
$this->convenzione();
$this->tributiTerritorio();
$this->section("unitaNegoziali","Unita Negoziali","*");
$this->section("datiAssociazione", "Dati Associazione", "+");
//$this->variableSection([
// "Dati Trascrizione" => "datiTrascrizione",
// "Dati Iscrizione" => "datiIscrizione",
// "Dati Annotazione" => "datiAnnotazione"
//]);
$this->datiQuadroD();
$this->section("datiVolture", "Dati Volture", "*");
$this->progressivoConvenzione();
$this->tail();
}
private function tributiTerritorio() {
//
//
$this->head("Tributi Territorio");
$this->section("agevolazione","Agevolazione","*");
// $this->variableSection([
// "tassazioneTerritorio*" => "TassazioneTerritorio",
// "tassazioneFissaProporzionale*" => "TassazioneFissaProporzionale"
// ]);
$this->tipoLiquidazione();
$this->tail();
}
private function agevolazione() : void {
//
//
#TODO: questa dovra essere convertita
$this->head("Agevolazione", true);
$this->row(function(){
$this->attribute(function(){
$this->_tipo_agevolazione();
$this->rel(function(){
$this->descrizione();
},"N;0;50;A");
});
});
$this->tail(true);
}
private function residenza() : void {
//
//
$this->head("Residenza", true);
$this->attribute(function(){
$this->tipoDomicilio();
});
$this->indirizzoAnagrafico();
$this->tail(true);
}
private function domicilioEletto() : void {
//
//
$this->head("Domicilio Eletto");
$this->indirizzoAnagrafico();
$this->domicilioIpotecario();
$this->lsDomicilioIpotecario();
$this->tail();
}
private function datiImmobile() : void {
//
//
$this->head("Dati Immobile");
$this->immobileUT();
// $this->variableSection([
// "ImmobileU" => "immobileU",
// "ImmobileT" => "immobileY"
// ]);
$this->quoteFrazionate();
$this->datiIndirizzo();
$this->section("estremiPrecedenti","Estremi Precedenti","*");
$this->idImmobile();
$this->tail();
}
private function estremiPrecedenti() : void {
//
//
$this->head("Estremi Precedenti");
// $this->variableSection([
// "IdentificativoDefinitivo" => "identificativoDefinitivo",
// "IdentificativoProvvisorio" => "identificativoProvvisorio"
// ]);
$this->progressivoEstremoPrecedente();
$this->tipoCatasto();
$this->codiceComune();
$this->codiceComuneCatastale();
$this->tail();
}
private function identificativoDefinitivo() : void {
//
//
$this->head("IdentificativoDefinitivo");
$this->foglio();
$this->particellaUno();
$this->particellaDue();
$this->subAlternoUno();
$this->subAlternoDue();
$this->sezUrbana();
$this->tail();
}
private function datiIndirizzo() : void {
//
//
$this->head("Dati Indirizzo");
$this->codiceStradario();
$this->codiceIndirizzo();
$this->indirizzo();
$this->lsInidirizzo();
$this->numeroCivico();
$this->interno();
$this->piano();
$this->lotto();
$this->edificio();
$this->scala();
$this->tail();
}
private function quoteFrazionate() : void {
//
//
$this->head("Quote Frazionate");
$this->capitale();
$this->ipoteca();
$this->tail();
}
private function immobileUT() : void {
//
//
$this->head("ImmobileUT");
$this->codiceComune();
$this->codiceComuneCatastale();
$this->sezCensuaria();
$this->fondoDS();
$this->tail();
}
private function datiVolturaCatastale() : void {
//
//
$this->head("Dati Voltura Catastale");
$this->volturaCatastale();
$this->section("unitaNegoziali","Unità Negoziali", "+");
$this->section("datiAssociazione","Dati Associazione", "+");
$this->identificativiInfo();
$this->ulterioriInfo();
$this->section("file","File","*");
$this->tail();
}
private function volturaCatastale() : void {
//
//
$this->head("Voltura Catastale");
$this->causale();
$this->descrizioneAtto();
$this->annotazione();
$this->riserva();
$this->tail();
}
private function datiTavolare() : void {
//
$this->head("Dati Tavolare");
$this->datiLibroFondiario();
$this->volturaCatastaleTavolare();
$this->tail();
}
private function datiLibroFondiario() : void {
//
$this->head("Dati Libro Fondiario", false);
$this->section("partitaTavolare","Partite Tavolari","*");
$this->section("unitaTavolare","Unità Tavolari","*");
$this->section("istanzaTavolare", "Istanze Tavolari", "*");
$this->tail();
}
private function iscrizioneTavolare() : void {
//
//
$this->section("titoloDiritto", "Titolo Diritto", "*");
$this->partitaDestinazione();
$this->datiIscrizione();
$this->section("datiAssociazioneTavolare", "Dati Associazione Tavolare", "*");
$this->progressivoIscrizione();
$this->tipoRichiesta();
$this->classe();
$this->numeroGN();
$this->annoGN();
$this->numeroIscr();
$this->testoLibero();
$this->lsTestoLibero();
}
private function unitaTavolare() : void {
//
//
$this->textWithPrepend([
"title" => "Id Unità Tavolare",
"name" => "id_unità_tavolare",
"rel" => "S;5;5;N",
"prefix" => "UT"
]);
$this->text("Id Partita Tavolare", "id_partita_tavolare");
$this->text("Id Particella", "id_particella");
$this->text("Id Porzione Materiale", "id_porzione_materiale");
}
private function istanzaTavolare() : void {
//
//
$this->head("IstanzaTavolare");
$this->section("iscrizioneTavolare","Iscrizione Tavolare","*");
$this->tassazioneTavolare();
$this->destinatarioDecretoTavolare();
$this->section("allegati", "Allegati", "*", true);
$this->section("attoIstanza","Atto Istanza","*");
$this->tail();
}
private function attoIstanza() : void {
//
//
$this->head("Atto Istanza");
$this->codiceFiscalePU();
$this->primoNumero();
$this->secondoNumero();
$this->dataAtto();
$this->tail();
}
private function destinatarioDecretoTavolare() : void {
//
//
$this->section("altriDestinatari","Altri Destinatari","*");
$this->notificaPubblicoUfficiale();
$this->idSoggettoNotifica();
}
private function altriDestinatari() : void {
//
$this->head("AltriDestinatari");
// $this->variableSection([
// "DestinatarioF" => "destinatarioF",
// "DestinatarioN" => "destinatarioN"
// ]);
$this->indirizzoAnagrafico();
$this->tail();
}
private function destinatarioF() : void {
//
//
$this->head("DestinatarioF");
$this->cognome();
$this->nome();
$this->tail();
}
private function destinatarioN() : void {
//
//
$this->head("DestinatarioN");
$this->denominazione();
$this->lsDenominazione();
$this->tail();
}
private function indirizzoAnagrafico() : void {
//
//
$this->head("IndirizzoAnagrafico", true);
$this->attribute(function(){
$this->rel(function(){
$this->codiceComune();
}, "S;4;4;A");
//$this->rel(function(){
// $this->localitaEstera();
// $this->indirizzo();
// $this->lsInidirizzo();
//},"N;2;50;A");
//$this->rel(function(){
// $this->cap();
//},"N;5;5;N");
//$this->rel(function(){
// $this->indirizzoEmail();
//},"N;2;255;E");
});
$this->tail(true);
}
private function volturaCatastaleTavolare() : void {
//
//
$this->head("Voltura Catastale Tavolare");
$this->volturaTavolare();
$this->tassazioneTavolare();
$this->section("unitaNegoziali","Unita Negoziali","+");
$this->section("datiAssociazione","Dati Associazione", "+");
$this->identificativiInfo();
$this->ulterioriInfo();
$this->section("file","File","*");
$this->progressivoVoltCatTavolare();
$this->tipoRichiesta();
$this->tail();
}
private function tassazioneTavolare() : void {
//
//
$this->head("Tassazione Tavolare");
$this->section("tassazioneTerritorio","Tassazione Territorio","*");
$this->tipoLiquidazione();
$this->checkbox("Pagamento Cumulativo", "tipo_pagamento");
$this->tail();
}
private function tassazioneTerritorio() : void {
//
//
$this->head('Tassazione Territorio');
$this->text("Codice Tributo", "codice_tributo", "", "col-4");
$this->text("Importo", "importo", "", "col-4");
$this->tail();
}
private function volturaTavolare() : void {
//
//
$this->head("Voltura Tavolare");
$this->text("Numero Istanza", "numero_istanza");
$this->causale();
$this->descrizioneAtto();
$this->textarea("Tipo Atto", "tipo_atto");
$this->riserva();
$this->select([
"I" => "Italiano",
"T" => "Tedesco"
], "Lingua Compilazione", "lingua_compilazione");
$this->tail();
}
private function datiTitolo() : void {
//
//
$this->head("Dati Titolo", true);
$this->row(function(){
$this->frame(function(){
$this->titolo();
});
$this->title("Allegati");
$this->section("allegati", "Allegati", "*", true);
$this->attribute(function(){
$this->frame(function(){
$this->rel(function(){
$this->elaborazione();
},"S;1;1;N");
$this->soloVoltura();
$this->tipoBollo();
});
});
});
$this->tail(true);
}
private function titolo() : void {
//
//
$this->head("Titolo", true);
$this->attribute(function(){
$this->rel(function(){
$this->modalitaPagamentoCorr();
},"S;1;1;ALFA");
$this->attoEsenteRegistrazione();
$this->rel(function(){
$this->dataAtto();
}, "S;10;10;D");
$this->rel(function(){
$this->descrizione();
}, "S;2;61;A;");
});
$this->tail(true);
}
private function chiaveAdempimento() : void {
//
//
$this->head("Chiave Adempimento", true);
$this->row(function(){
$this->frame(function(){
$this->rel(function(){
$this->primoNumeroRepertorio();
},"S;1;7;N");
$this->rel(function(){
$this->secondoNumeroRepertorio();
},"N;1;5;N");
});
$this->frame(function(){
$this->codiceFiscalePU();
$this->pubblicoUfficiale();
});
// $this->attribute(function(){
// $this->frame(function(){
// $this->rel(function(){
// $this->codiceUfficioEntratePrecedente();
// }, "N;3;3;A");
// $this->rel(function(){
// $this->annoSuccessione();
// },"N;4;4;N");
// });
// });
});
$this->tail(true);
}
private function datiVolture() : void {
//
//
$this->voltureMancanti();
$this->attiTecniciMancanti();
$this->idImmobile();
$this->idSoggettoNonComparente();
}
private function voltureMancanti() : void {
//
//
//
$this->identificativiInfo();
$this->ultimoAttoMancante();
$this->ulterioriInfo();
$this->passaggiIntermedi();
$this->passaggiAttiLegali();
}
private function ultimoAttoMancante() : void {
$this->head("Ultimo Atto Mancante", false, "", true);
//
$this->checkbox("Unico Atto Mancante","unico_atto_mancante");
//$this->variableSection([
// "Voltura Info Successione" => "volturaInfoSuccessione",
// "Voltura Info AttoNotarile" => "volturaInfoAttoNotarile",
// "Voltura Info Atto" => "volturaInfoAtto"
//]);
$this->volturaInfoNota();
$this->tail();
}
private function volturaInfoSuccessione() {
$this->head("Voltura Info Succesione");
//
$this->volume();
$this->numero();
$this->anno();
$this->codiceUfficioRegistro();
$this->dataMorte();
$this->descrizione();
$this->dataRegistrazione();
$this->tail();
}
private function volturaInfoNota() {
//
$this->numeroNota();
$this->progressivoNota();
$this->anno();
$this->dataEfficacia();
$this->descrizione();
}
private function primoNumeroRepertorio() {
//
#TODO: risolvere questo BUG nell'xml
#
#1234567
#
//$this->head("Primo Numero Repertorio", true);
$this->_primo_numero_repertorio();
//$this->tail(true);
}
private function secondoNumeroRepertorio() {
//
//$this->head("Secondo Numero Repertorio", true);
$this->_secondo_numero_repertorio();
//$this->tail(true);
}
private function attiTecniciMancanti() {
//
$this->head("Atti Tecnici Mancanti");
$this->identificativiInfo();
$this->ImmobileOriginario();
$this->ulterioriInfo();
$this->tail();
}
private function ImmobileOriginario() {
//
//
$this->IdentificativoDefinitivo();
$this->tipoCatasto();
$this->codiceComune();
$this->sezioneCensuaria();
}
#endregion
#region values
private function tipoAltroSoggetto() {
$this->checkbox("Soggetto Rappresentante", "tipo_altro_soggetto");
}
private function qualifica() {
$this->select([
"1" => "Procuratore",
"2" => "Curatore",
"3" => "Tutore",
"4" => "Rappresentante legale",
"5" => "Altro rappresentante"
],"Qualifica","qualifica", "col-12");
}
private function primoNumero() {
$this->text("Primo Numero", "primo_numero");
}
private function secondoNumero() {
$this->text("Secondo Numero", "secondo_numero");
}
private function garanziaPerDebitoNonProprio() : void {
$this->checkbox("Garanzia a favore di terzi", "garanzia_per_debito_non_proprio");
}
private function immobileStrumentale() : void {
$this->checkbox("Immobile Strumentale", "immobile_strumentale");
}
private function lsDenominazione() {
$this->text("Denominazione (lingua straniera)","ls_denominazione");
}
private function localitaEstera() : void {
$this->text("Località Estera", "localita estera");
}
private function notificaPubblicoUfficiale() : void {
$this->checkbox("Notifica Pubblico Ufficiale", "notifica_pubblico_ufficiale");
}
private function idSoggettoNotifica() : void {
$this->text("Id Soggetto Notifica", "id_soggetto_notifica");
}
private function riserva() : void {
$this->checkbox("Riserva", "riserva");
}
private function annotazione() : void {
$this->textarea("Annotazione", "annotazione");
}
private function descrizioneAtto() : void {
$this->textarea("Descrizione Atto", "descrizione_atto");
}
private function tipoBollo() : void {
$this->checkbox("L'atto è esente da imposta di bollo", "tipo_bollo");
}
private function elaborazione() : void {
$this->select([
1 => "Solo Ufficio delle Entrate (ex E)",
2 => "Solo Uffici del Territorio (ex T)",
3 => "Uffici delle Entrate e del Territorio (ex C)",
4 => "Solo uffici del Libro Fondiario",
5 => "Uffici dell'Entrate e del Libro Fondiari ",
6 => "Uffici del Territorio e del Libro Fondiario",
7 => "Uffici delle Entrate, del Territorio e del Libro Fondiario"
], "Uffici Interessati dall'Adempimento", "elaborazione","col-12");
}
private function soloVoltura() : void {
$this->select([
0 => "No",
1 => "Voltura derivante da atti soggetti a registrazione nel Registro Imprese",
9 => "Voltura derivante da altri tipi di atto"
], "Voltura", "solo_voltura");
}
private function _titolo() : void {
$this->text("Titolo","titolo","","col");
}
private function codicefiscaleStudio(?string $text = null) : void {
$this->text($text ?? "Codice Fiscale Studio", "codice_fiscale_studio","","col-lg-6 col-12");
}
private function iban() : void {
$this->text("Iban", "codice_iban", "", "col-12");
}
private function capitale() : void {
$this->text("Capitale", "capitale");
}
private function tassoInteresseAnn() : void {
$this->text("Tasso Interesse Annuo","tasso_interesse_ann", "col-12 col-lg-6", "tax");
}
private function tassoInteresseSem() : void {
$this->text("Tasso Interesse Semestre","tasso_interesse_sem", "col-12 col-lg-6", "tax");
}
private function importo(?string $text = null) : void {
$this->number($text ?? "Importo", "importo","", "col-12");
}
private function formalitaAnnotata() : void {
$this->head("Formalità Annotata");
$this->select([
"T" => "Trascrizione",
"I" => "Iscrizione",
"A" => "Annotazione",
"PA" => "PrivilegioAgrario",
"PM" => "Privilegio Minerario",
"PS" => "Privilegio Speciale"
],"Tipologia Nota", "tipo_nota_annotare", "", "col-12");
$this->tail();
}
private function ridSommaDovutaDa() {
$this->text("Da","rid_somma_dovuta_da");
}
private function ridSommaDovutaA() {
$this->text("A","rid_somma_dovuta_a");
}
private function ridSommaIpotecaDa() {
$this->text("Da","rid_somma_ipoteca_da");
}
private function ridSommaIpotecaA() {
$this->text("A","rid_somma_ipoteca_a");
}
private function valImmobiliLiberati() {
$this->text("Valori Immobili Liberati","val_immobili_liberati", "col-12");
}
private function PLQuadro() : void {
foreach (["A", "B", "C"] as $p) {
$lp = strtolower($p);
$this->checkbox("Presente parte libera quadro {$p}", "parte_libera_quadro_{$lp}");
}
}
private function codiceNegozio() : void {
$this->text("Codice Negozio", "codice_negozio", "", "col-12 mt-2", "", ["readonly" => true]);
}
private function idSoggettoAventeCausa() : void {
$this->checkbox("Soggetto Avente Causa", "id_soggetto_avente_causa", "col-12 col-lg-6 text-left", ["class" => "acausa_check"]);
}
private function idSoggettoDanteCausa() : void {
$this->checkbox("Soggetto Dante Causa", "id_soggetto_dante_causa", "col-12 col-lg-6 text-left", ["class" => "dcausa_check"]);
}
private function datiQuadroD() : void {
$this->checkbox("Sono presenti Dati Quadro", "dati_quadro_d");
}
private function idSoggettoNonComparente() {
$this->text("ID Soggetto non comparente", "id_soggetto_non_comparente");
}
private function passaggiIntermedi() {
$this->checkbox("Passaggi Intermedi", "passaggi_intermedi");
}
private function passaggiAttiLegali() {
$this->checkbox("Passaggi Atti Legali", "passaggi_atti_legali");
}
private function attoEsenteRegistrazione() {
$this->checkbox("Atto Esente Registrazione", "atto_esente_registrazione");
}
private function modalitaPagamentoCorr() {
$this->select([
"C" => "contante",
"A" => "assegno",
"B" => "bonifico",
"M" => "pagamento eseguito con modalita' miste (contante, assegno,bonifico)",
"D" => "pagamento eseguito con modalita' diverse dalle precedenti"
], "Modalità Pagamento", "modalita_pagamento_corr", "col-12");
}
private function sezioneCensuaria() {
$this->text("Sezione Censuaria", "sezione_censuaria", "1,A");
}
private function tipoCatasto() {
$this->select([
"T" => "T",
"U" => "U"
], "Tipo Catasto", "tipo_catasto");
}
private function causale() : void {
// Causale:
// causale della nota di voltura catasto urbano e fondiario per il Friuli
// IST - Istrumento (atti tra vivi)
// DEC - Decreto (atti amministrativi e giudiziari)
// SEN - Sentenza (atti giudiziari)
// VER - Verbale (atti giudiziari)
// Causale:
// causale della nota di voltura catasto urbano per il Trentino Alto Adige
// DOC - Documento generico
// RET - Rettifica di precedente denuncia
$this->select([
"IST" => "Istrumento (atti tra vivi)",
"DEC" => "Decreto (atti amministrativi e giudiziari)",
"SEN" => "Sentenza (atti giudiziari)",
"VER" => "Verbale (atti giudiziari)",
"DOC" => "Documento generico",
"RET" => "Rettifica di precedente denuncia",
],"Causale","causale");
}
private function tipoDomicilio() : void {
$this->checkbox("Domicilio", "tipo_domicilio");
}
private function formalitaRiferimento() : void {
$this->head("Formalità di Riferimento");
$this->text("Codice Conservatoria", "codice_conservatoria");
$this->select([
"T" => "Trascrizione",
"I" => "Iscrizione",
"A" => "Annotazione"
],"Tipo Nota di Riferimento", "tipo_nota_riferimento");
$this->data();
$this->text("Registro Particolare Uno", "registro_particolare_uno");
$this->text("Registro Particolare Due", "registro_particolare_due");
$this->tail();
}
private function datiTrascrizione() : void {
$this->head("Dati Trascrizione");
$this->checkbox("Convenzione soggetta a Voltura", "convenzione_soggetta_a_voltura");
$this->checkbox("Voltura catastale differita", "voltura_differita_catastale");
$this->datiQuadroD();
$this->checkbox("Sono presenti termini di efficacia atto", "termini_efficacia_atto");
$this->checkbox("Successione Testamentaria","successione_testamentaria");
$this->checkbox("Rinuncia Testamentaria","rinuncia_testamentaria");
$this->select([
0 => "Sospensiva",
1 => "Risoluta"
], "Condizione", "condizione", "col-12");
$this->date("Termine differimento", "termine_differimento");
$this->dataMorte();
$this->formalitaRiferimento();
$this->PLQuadro();
$this->tail();
}
private function datiIscrizione() : void {
$this->head("Dati Iscrizione");
$this->capitale();
$this->tassoInteresseAnn();
$this->tassoInteresseSem();
$this->text("Importo Interessi", "importo_interessi");
$this->text("Spese Interessi Mora", "spese_interessi_mora");
$this->text("Totale", "totale");
$this->checkbox("Importi Tassi Variabili", "importo_tassi_variabili");
$this->checkbox("Importi in Valuta Estera", "importo_valuta_estera");
$this->checkbox("Somma Iscritta", "somma_iscritta");
$this->checkbox("Condizione Risolutiva", "condizione_risolutiva");
$this->text("Durata esigibilità (aammgg)", "durata_esigibilità");
$this->date("Termine Ipoteca","termine_ipoteca");
$this->checkbox("Stipula Unico Contratto", "stipola_unico_contratto");
$this->text("Numero Titoli di Credito", "numero_titoli_credito");
$this->checkbox("Elenco Macchinari", "elenco_macchinari");
$this->formalitaRiferimento();
$this->PLQuadro();
$this->tail();
}
private function datiAnnotazione() : void {
$this->head("Dati Annotazione");
$this->checkbox("Voluta Catastale dell'atto originario", "voltura_catastale_atto_orig");
$this->formalitaAnnotata();
$this->title("Riduzione della Somma Dovuta");
$this->ridSommaDovutaDa();
$this->ridSommaDovutaA();
$this->title("Riduzione dell'Ipoteca");
$this->ridSommaIpotecaDa();
$this->ridSommaIpotecaA();
$this->valImmobiliLiberati();
$this->tail();
}
private function idNegozio() : void {
$this->textWithPrepend([
"title" => "ID Negozio",
"name" => "id_negozio",
"class" => "col-12 col-lg-3",
"prefix" => "N"
]);
}
private function idNegozioPermuta() : void {
$this->textWithPrepend([
"title" => "ID Negozio Permuta",
"name" => "id_negozio_permuta",
"class" => "col-12 col-lg-3",
"prefix" => "N"
]);
}
private function valoreNegozio() : void {
$this->number("Valore Negozio", "valore_negozio", "", "col-12");
}
private function annotazioni() : void {
$this->textarea("Annotazioni", "annotazioni");
}
private function rogante() {
$this->text("Rogante", "rogante");
}
private function datiAssociazione() : void {
$this->text("Soggetto","id_soggetto");
$this->text("Unità Negoziale","id_unita_negoziale");
$this->text("Dati Titolarità","dati_titolarita");
$this->text("Qualifica", "qualifica");
$this->select([
0 => "Venditore",
1 => "Acquirente",
2 => "Cedente",
3 => "Cessionario",
4 => "Donante",
5 => "Donatario",
6 => "Debitore ipotecario",
7 => "Creditore ipotecario",
8 => "Terzo Datore di Ipoteca",
9 => "Nuovo Soggetto a Favore",
10 => "Debitore Non Datore",
11 => "Altra qualifica (F)",
12 => "Altra qualifica (C)"
], "Tipo di Qualifica", "tipo_qualifica");
$this->select([
0 => "Istante",
1 => "Istanziato"
], "Qualifica Tavolare", "qualifica_tavolare");
}
private function tipoDocumento() : void {
$this->select([
"CI" => "CI",
"PA" => "PA",
"PS" => "PS",
"AT" => "AT"
], "TipoDocumento", "tipo_documento");
}
private function codiceFiscaleSocieta() : void {
$this->text("codice Fiscale Societa","codice_fiscale_societa", "11");
}
private function numeroDocumento() : void {
$this->text("NumeroDocumento", "numero_documento", "20");
}
private function dataRilascioDocumento() : void {
$this->date("DataRilascioDocumento", "data_rilascio_documento");
}
private function dataScadenzaDocumento() : void {
$this->date("DataScadenzaDocumento", "data_scadenza_documento");
}
private function recapitoTelefonico() : void {
$this->text("RecapitoTelefonico", "recapito_telefonico", "20");
}
private function codAtto() : void {
$this->text("Codice Atto", "cod_atto");
}
private function tipoPU() {
$this->select([
1 => "Notaio",
2 => "Altro pubblico ufficiale",
3 => "Autorità emittente",
9 => "Altro soggetto",
], "Tipo PU", "tipo_pu", "col-12 col-lg-6");
}
private function denominazionePU() {
$this->text("Nome e Cognome", "denominazione_pu", "col-12 col-lg-6");
}
private function lsDenominazionePU() {
$this->text("Nome e Cognome (Lingua Straniera)", "ls_denominazione_pu", "col-12 col-lg-3");
}
private function codiceComune() {
$this->select($this->codici_catastali, "Comune", "codice_comune", "col");
//$this->text("Codice Comune", "codice_comune", "col-12 col-lg-3");
}
private function indirizzo() {
$this->text("Indirizzo", "indirizzo", "col-12 col-lg-6");
}
private function lsInidirizzo() {
$this->text("Indirizzo (Lingua Straniera)", "ls_indirizzo", "col-12 col-lg-6");
}
private function cap() {
$this->text("Cap", "cap", "col-12 col-lg-3");
}
private function indirizzoEmail() {
$this->text("Email", "indirizzoemail", "col-12 col-lg-3");
}
private function codiceUfficioEntratePrecedente() {
$this->text("Codice Ufficio Entrate Precedente", "codUfficioEntratePrecedente");
}
private function annoSuccessione() {
$this->yearInput("Anno Successione", "anno_succ");
}
private function progressivoConvenzione() {
$this->text("Progressivo Convenzione", "progressivo_convenzione", "col-12 col-lg-6");
}
private function progressivoConvenzioneCollegata() {
$this->text("Progressivo Convenzione Collegata", "progressivo_convenzione_collegata", "col-12 col-lg-6");
}
private function progressivoConvenzioneParigrado() {
$this->text("Progressivo Conenzione Parigrado", "progressivo_convenzione_parigrado", "col-12 col-lg-6");
}
private function codiceConservatoria() {
$this->text("Codice Conservatoria", "codice_conservatoria", "col-12 col-lg-6");
}
private function codiceTributo() : void {
$this->text("Codice Tributo","codice_tributo", "col-4");
}
private function aliquota() : void {
$this->textWithPrepend([
"title" => "Aliquota",
"name" => "aliquota",
"prefix" => "%"
]);
}
private function effettiSospesi() : void {
$this->checkbox("Effetti Sospesi", "effetti_sospesi");
}
private function soggettoIVA() : void {
$this->checkbox("Soggetto Iva","soggetto_iva");
}
private function esente() : void {
$this->checkbox("Esente","esente");
}
private function registro() : void {
$this->text("Registro", "registro");
}
private function ipocatastale() : void {
$this->text("Ipocatastale", "ipocatastale");
}
private function ipoteca() : void {
$this->text("Ipoteca", "ipoteca");
}
private function sede() : void {
$this->text("Sede", "sede");
}
private function paternita() {
$this->text("Paternità", "paternita");
}
private function cognomeMaritale() {
$this->text("Cognome Maritale", "cognome_maritale");
}
private function diFU() {
$this->select([
"D" => "D",
"F" => "F"
],"DiFu", "difu");
}
private function idConiugeNonComparente() {
$this->textWithPrepend([
"title" => "Id Coniuge non Comparente",
"name" => "id_coniuge_non_comparente",
"prefix" => "CN"
]);
}
private function provincia() : void {
$this->text("Provincia", "provincia", "", "col-lg-6 col-12");
}
private function statoCivile() : void {
$this->select([
"C" => "Coniugato in comunione",
"S" => "Coniugato in separazione",
"L" => "Stato libero"
],"Stato Civile", "stato_civile");
}
private function lsCognome() : void {
$this->text("Cognome (lingua straniera)", "ls_cognome");
}
private function lsNome() : void {
$this->text("Nome (lingua straniera)", "ls_nome");
}
private function comuneNascita() : void {
$this->text("Comune Nascita", "comune_nascita");
}
private function sesso() : void {
$this->select([
"M" => "Maschio",
"F" => "Femmina"
], "Sesso", "sesso");
}
private function dataNascita() : void {
$this->date("Data Nascita","data_nascita");
}
private function idSoggetto() : void {
$this->textWithPrepend([
"title" => "Id Soggetto",
"name" => "id_soggetto",
"prefix" => "S",
"readonly" => true
]);
}
private function idAltroSoggetto() : void {
$this->textWithPrepend([
"title" => "Id Altro Soggetto",
"name" => "id_altro_soggetto",
"prefix" => "SR",
"readonly" => true
]);
}
private function codiceComuneCatastale() : void {
$this->text("Codice Comune Catastale", "codice_comune_catastale");
}
private function sezCensuaria() : void {
$this->text("Sezione Censuaria", "sezione_censuaria");
}
private function fondoDS() : void {
$this->select([
"D" => "Dominante","S" => "Servente"
],"Fondo DS", "fondo_ds");
}
private function tipoRichiedente() : void {
$this->select([
0 => "Soggetto delegato",
1 => "Intermediario",
2 => "Rappresentante",
3 => "EntePA",
4 => "Cittadino"
],"TipoRichiedente", "tipo_richiedente");
}
private function progressivoIscrizione() : void {
$this->text("Progressivo Iscrizione", "progressivo_iscrizione");
}
private function classe() : void {
$this->select([
"A" => "Iscrizione del foglio A2",
"B" => "Iscrizione del foglio B",
"C" => "Iscrizione del foglio C"
], "Classe", "classe");
}
private function testoLibero() : void {
$this->textarea("Testo Libero", "testo_libero");
}
private function lsTestoLibero() : void {
$this->rel = "N;2;3200;A";
$this->textarea("Testo Libero (lingua straniera)", "testo_libero");
}
private function numeroIscr() : void {
$this->text("numero GN", "numero_gn");
}
private function numeroGN() : void {
$this->text("numero GN", "numero_gn");
}
private function annoGN() : void {
$this->yearInput("anno GN", "anno_gn");
}
private function partitaDestinazione() : void {
$this->head("Partita Destinazione");
$this->tail();
}
private function titoloDiritto() : void {
$this->head("Titolo Diritto");
$this->tail();
}
private function datiAssociazioneTavolare() : void {
$this->head("Dati Associazione Tavolare");
$this->tail();
}
private function sezUrbana() {
$this->text("sezione Urbana", "sez_urbana");
}
private function particellaUno() {
$this->text("Particella Uno", "particella_uno");
}
private function particellaDue() {
$this->text("Particella Due", "particella_due");
}
private function subAlternoUno() {
$this->text("Particella Due", "particella_due");
}
private function subAlternoDue() {
$this->text("Particella Due", "particella_due");
}
private function foglio() {
$this->text("Foglio", "foglio");
}
private function numeroNota() {
$this->text("Numero Nota", "numero_nota");
}
private function progressivoNota() {
$this->text("Progressivo Nota", "progressivo_nota");
}
private function codiceUfficioRegistro() {
$this->text("Codice Ufficio Registro", "codice_ufficio_registro");
}
private function data() {
$this->date("Data","data", "col-12");
}
private function dataAtto() {
$this->date("Data Atto","data-atto", "col-12");
}
private function dataMorte() {
$this->date("Data della morte de cuius (ggmmaaaa)", "data_morte");
}
private function dataRegistrazione() {
$this->date("Data Registrazione (ggmmaaaa)", "data_registrazione");
}
private function _primo_numero_repertorio() {
$this->text("Primo Numero Repertorio", "primo_numero_repertorio");
}
private function _secondo_numero_repertorio() {
$this->text("Secondo Numero Repertorio", "secondo_numero_repertorio");
}
private function codUfficioEntrate() : void {
$this->select(
UnimodUtils::getUfficiEntrate(),
"Codice Ufficio Entrate", "cod_ufficio_entrate","col-12"
);
}
private function partitaTavolare() : void {
$this->text("ID Partita Tavolare", "id_partita_tavolare");
$this->text("Cod Comune Catastale", "cod_comune_catastale");
$this->select(
[
0 => "Sezione I",
1 => "Sezione II"
],"Sezione"
);
$this->text("Numero", "numero");
$this->text("Corpo", "corpo");
}
private function _tipo_agevolazione() : void {
$this->select([
0 => "Assenza di agevolazione",
99 => "Altro tipo"
],"Tipo","tipo","col-12");
}
private function tipoLiquidazione() : void {
$this->select([
0 => "pagamento con F24 telematico",
1 => "formalita' esente: liquidazione gratuita ",
2 => "formalita' e volture da eseguirsi senza previo pagamento dell'imposta: iscrizione a campione certo (art. 15 del TU del 31/10/1990 n.347)",
3 => "formalita' e volture da eseguirsi a debito (art. 16 del TU del 31/10/1990 n.347"
], "Tipo Liquidazione", "tipo_liquidazione");
}
private function convenzione() {
$this->head("Convenzione");
$this->select([
"T" => "Trascrizione",
"I" => "Iscrizione",
"A" => "Annotazione"
],"Tipo Nota","_tipo_nota");
$this->text("Specie","specie");
$this->textarea("Descrizione","descrizione");
$this->codAtto();
$this->progressivoConvenzioneCollegata();
$this->progressivoConvenzioneParigrado();
$this->codiceConservatoria();
$this->select([
0 => "assenza di Rinuncia Di Ipoteca Legale",
1 => "presenza di Rinuncia Di Ipoteca Legale"
],"Rinuncia di Ipoteca Legale", "rinuncia_di_ipoteca_legale", "col-12 col-lg-6");
$this->select([
0 => "No",
1 => "Si"
],"Accettabile con riserva", "accettabile_con_riserva", "col-12 col-lg-6");
$this->tail();
}
private function idImmobile() {
$this->textWithPrepend(
[
"title" => "Immobile",
"name" => "id_immobile",
"rel" => "S;0;6;N",
"prefix" => "I"
]
);
}
private function idUnitaNegoziale() {
$this->textWithPrepend(
[
"title" => "Unità",
"name" => "id_unita_negoziale",
"rel" => "S;0;6;N",
"prefix" => "U"
]
);
}
private function volume() {
$this->text("Volume", "volume");
}
private function numero() {
$this->text("Numero", "numero");
}
private function anno() {
$this->yearInput("Anno", "anno");
}
private function descrizione() {
$this->textarea("Descrizione", "descrizione", "col-12");
}
private function dataEfficacia() {
$this->date("Data Efficacia", "data_efficacia");
}
private function codiceStradario() : void {
$this->text("Dati Indirizzo", "dati_indirizzo", "S;1;3;N;");
}
private function codiceIndirizzo() : void {
$this->text("Codice Indirizzo", "codice_indirizzo", "S;1;3;N;");
}
private function numeroCivico() : void {
$this->text("Numero Civico", "numero_civico", "S;1;6;A;");
}
private function interno() : void {
$this->text("Interno", "interno", "S;1;3;A;");
}
private function piano() : void {
$this->text("Piano", "piano", "S;1;4;A;");
}
private function lotto() : void {
$this->text("Lotto", "lotto", "S;1;2;A;");
}
private function edificio() : void {
$this->text("Edificio", "edificio", "S;1;2;A;");
}
private function scala() : void {
$this->text("Scala", "scala", "S;1;2;A;");
}
private function progressivoEstremoPrecedente() : void {
$this->text("Progressivo Estremo Precedente", "progressivo_estremo_precedente");
}
private function domicilioIpotecario() : void {
$this->text("Domicilio Ipotecario", "domicilio_ipotecario");
}
private function lsDomicilioIpotecario() : void {
$this->text("Domicilio Ipotecario (lingua straniera)", "ls_domicilio_ipotecario");
}
private function codiceFiscale(?string $text = null, bool $readonly = false) : void {
$this->text($text ?? "Codice Fiscale", "codice_fiscale", "", "col-12 col-lg-6", "", ["readonly" => $readonly]);
}
private function nome(bool $readonly = false) : void {
$this->text("Nome", "nome", "", "col-12 col-lg-6", "", ["readonly" => $readonly]);
}
private function cognome(bool $readonly = false) : void {
$this->text("Cognome", "cognome", "", "col-12 col-lg-6", "", ["readonly" => $readonly]);
}
private function denominazione() : void {
$this->text("Denominazione", "denominazione", "", "col-12 col-lg-6", "", ["readonly" => true]);
}
private function progressivoVoltCatTavolare() : void {
$this->text("ProgressivoVoltCatTavolare","progressivo_volt_cat_tavolare");
}
private function codiceAllegato() : void {
$this->text("Tipo Allegato", "codice_allegato", "", "col-12 col-lg-6", "", ["value" => "99"]);
}
private function numeroAllegati() : void {
$this->text("Numero allegati", "numero_allegati", "", "col-12");
}
private function tipoRichiesta() : void {
$this->select([
"RC" => "Richiesta di Correzione",
"SI" => "Segnalazione di Incoerenza",
"VO" => "Voltura",
"RI" => "Richiesta di Integrazione",
"RR" => "Richiesta di Rettifica "
],"Tipo Richiesta", "tipo_richiesta");
}
private function progressivoInvio() : void {
#TODO: rendere durante i vari invii
$this->text("Progressivo Invio", "progressivo_invio");
}
private function controllo() : void {
$this->text("Controllo", "controllo");
}
#endregion
#region root Inputs
private function number(string $title = "NumberInput", string $name = "text_input", string $rel = "", $class="col-12 col-lg-6" , $extra = "") {
$name = $this->makeInputName($name);
$value = $this->get($name);
$this->_debug($name);
?>
hidden){?>
}
}
private function text(string $title = "TextInput", string $name = "text_input", string $rel = "", $class="col-12 col-lg-6" , $extra = "", array $options=[]) {
$name = $this->makeInputName($name);
$value = $this->get($name);
$this->_debug($name);
?>
hidden){?>
}
}
/**
* @param array $options
*
* {
* "title" => "Id Unità Tavolare",
* "name" => "id_unità_tavolare",
* "rel" => "S;5;5;N",
* "prefix" => "UT"
* }
*
* @return void
*/
private function textWithPrepend(array $options) {
$options["name"] = $this->makeInputName($options["name"]);
$value = $this->get($options["name"]);
$this->_debug($options["name"]);
?>
}
private function yearInput(string $title = "TextInput", string $name = "year_input", $class="col") {
$name = $this->makeInputName($name);
$this->_debug($name);
?>
}
private function date(string $title = "date", string $name = "date_input", $class="col-12 col-lg-6" ) {
$name = $this->makeInputName($name);
$value = $this->get($name);
$this->_debug($name);
?>
}
private function select(array $options = [], string $title = "select", string $name = "select_input", $class="col-12 col-lg-6", $id="") {
$name = $this->makeInputName($name);
$value = $this->get($name);
$this->_debug($name);
?>
= __($title) ?>=$this->mandatory()?>
=__('Seleziona...')?>
$opt){?>
>=$opt?>
}?>
}
private function textarea(string $title = "TextInput", string $name = "text_input", $class="col-12") {
$name = $this->makeInputName($name);
$value = $this->get($name);
$value = str_replace("\\n","\n",$value);
$value = str_replace("\\r","\r",$value);
$this->_debug($name);
?>
= __($title) ?>=$this->mandatory()?>
}
private function checkbox(string $title = "CheckboxInput", string $name = "checkbox_input", string $class ="col-12 text-left", array $options = []) : void {
$name = $this->makeInputName($name);
$selected = ($this->get($name) ?? null);
$this->_debug($name);
?>
}
#endregion
private function makeInputName(string $name) : string {
$current_chain = $this->chain;
if ($this->attribute) {
$name = "_attributes.".$name;
}
$current_chain[] = $name;
$name = implode(".", $current_chain);
return $name;
}
}
?>