mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Fattura a privati cittadini
This commit is contained in:
parent
0e6603b535
commit
fde5ae03a8
@ -13,8 +13,10 @@ switch (post('op')) {
|
||||
case 'update':
|
||||
// Informazioni sull'anagrafica
|
||||
$anagrafica->codice = post('codice');
|
||||
if (empty(post('tipo')) or post('tipo') == 'Privato'){
|
||||
if (empty(post('tipo'))){
|
||||
$anagrafica->codice_destinatario = '';
|
||||
}else if (post('tipo') == 'Privato'){
|
||||
$anagrafica->codice_destinatario = '0000000';
|
||||
}else{
|
||||
//controlli anche su FatturaElettronica.php
|
||||
if (empty(post('codice_destinatario')) or post('codice_destinatario') == '999999' or post('codice_destinatario') == '0000000')
|
||||
|
@ -44,7 +44,8 @@ class FatturaElettronica
|
||||
WHERE `co_documenti`.`id` = '.prepare($id_documento));
|
||||
|
||||
// Controllo sulla possibilità di creare la fattura elettronica
|
||||
if ($this->documento['stato'] != 'Emessa' || $this->getCliente()['tipo'] == 'Privato') {
|
||||
// Posso fatturare ai privati utilizzando il codice fiscale
|
||||
if ($this->documento['stato'] != 'Emessa') {
|
||||
throw new \UnexpectedValueException();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user