mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 17:07:01 +01:00
Fix per idconto righe fattura da fatturazione in bulk
Fix minori
This commit is contained in:
parent
e7a1cda360
commit
ee9c8cacc9
@ -117,7 +117,7 @@ $operations['crea_fattura'] = [
|
||||
'text' => tr('Fattura documenti'),
|
||||
'data' => [
|
||||
'title' => tr('Vuoi davvero fatturare questi documenti?'),
|
||||
'msg' => '{[ "type": "checkbox", "placeholder": "'.tr('Aggiungere alle fatture esistenti non ancora emesse?').'", "name": "accodare" ]}<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module=\''.$id_fatture.'\' AND is_fiscale = 1 ORDER BY name", "value": "'.$id_segment.'" ]}',
|
||||
'msg' => '{[ "type": "checkbox", "label": "'.tr('Aggiungere alle fatture esistenti non ancora emesse?').'", "placeholder": "'.tr('Aggiungere alle fatture esistenti non ancora emesse?').'", "name": "accodare" ]}<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module=\''.$id_fatture.'\' AND is_fiscale = 1 ORDER BY name", "value": "'.$id_segment.'" ]}',
|
||||
'button' => tr('Procedi'),
|
||||
'class' => 'btn btn-lg btn-warning',
|
||||
'blank' => false,
|
||||
|
@ -100,8 +100,11 @@ switch (post('op')) {
|
||||
$qta = $riga->qta_rimanente;
|
||||
|
||||
if ($qta > 0) {
|
||||
//Fix per idconto righe fattura
|
||||
$riga->idconto = $fattura->idconto;
|
||||
$copia = $riga->copiaIn($fattura, $qta);
|
||||
|
||||
|
||||
// Aggiornamento seriali dalla riga dell'ordine
|
||||
if ($copia->isArticolo()) {
|
||||
$copia->serials = $riga->serials;
|
||||
@ -144,7 +147,7 @@ $operations['crea_fattura'] = [
|
||||
'text' => tr('Fattura documenti'),
|
||||
'data' => [
|
||||
'title' => tr('Vuoi davvero fatturare questi documenti?'),
|
||||
'msg' => '<br>{[ "type": "checkbox", "placeholder": "'.tr('Aggiungere alle fatture esistenti non ancora emesse?').'", "name": "accodare" ]}
|
||||
'msg' => '{[ "type": "checkbox", "label": "'.tr('Aggiungere alle fatture esistenti non ancora emesse?').'", "placeholder": "'.tr('Aggiungere alle fatture esistenti non ancora emesse?').'", "name": "accodare" ]}
|
||||
<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module=\''.$id_fatture.'\' AND is_fiscale = 1 ORDER BY name", "value": "'.$id_segment.'" ]}',
|
||||
'button' => tr('Procedi'),
|
||||
'class' => 'btn btn-lg btn-warning',
|
||||
|
@ -72,7 +72,7 @@ switch (filter('op')) {
|
||||
$codice_modalita_pagamento_fe = filter('codice_modalita_pagamento_fe');
|
||||
|
||||
if (isset($descrizione)) {
|
||||
$dbo->query('INSERT INTO `co_pagamenti` (`descrizione`, codice_modalita_pagamento_fe ) VALUES ('.prepare($descrizione).', '.prepare($codice_modalita_pagamento_fe).' )');
|
||||
$dbo->query('INSERT INTO `co_pagamenti` (`descrizione`, `codice_modalita_pagamento_fe`, `prc` ) VALUES ('.prepare($descrizione).', '.prepare($codice_modalita_pagamento_fe).', 100 )');
|
||||
$id_record = $dbo->lastInsertedID();
|
||||
|
||||
flash()->info(tr('Aggiunta nuova tipologia di _TYPE_', [
|
||||
|
@ -90,7 +90,7 @@ foreach ($results as $result) {
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{[ "type": "number", "label": "'.tr('Percentuale').'", "name": "percentuale[]", "value": "'.$result['prc'].'", "icon-after": "<i class=\"fa fa-percent\"></i>" ]}
|
||||
{[ "type": "number", "label": "'.tr('Percentuale').'", "name": "percentuale[]", "decimals": "2", "min-value": "0", "value": "'.$result['prc'].'", "icon-after": "<i class=\"fa fa-percent\"></i>" ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
@ -124,7 +124,7 @@ foreach ($results as $result) {
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{[ "type": "number", "label": "'.tr('Distanza in giorni').'", "name": "distanza[]", "decimals": "0", "value": "'.$result['num_giorni'].'" ]}
|
||||
{[ "type": "number", "label": "'.tr('Distanza in giorni').'", "name": "distanza[]", "decimals": "0", "min-value": "0", "value": "'.$result['num_giorni'].'" ]}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -92,6 +92,8 @@ switch (post('op')) {
|
||||
$qta = $riga->qta_rimanente;
|
||||
|
||||
if ($qta > 0) {
|
||||
//Fix per idconto righe fattura
|
||||
$riga->idconto = $fattura->idconto;
|
||||
$copia = $riga->copiaIn($fattura, $qta);
|
||||
|
||||
// Aggiornamento seriali dalla riga dell'ordine
|
||||
@ -117,7 +119,7 @@ $operations['crea_fattura'] = [
|
||||
'text' => '<span><i class="fa fa-file-code-o"></i> '.tr('Fattura documenti'),
|
||||
'data' => [
|
||||
'title' => tr('Vuoi davvero fatturare questi documenti?'),
|
||||
'msg' => '{[ "type": "checkbox", "placeholder": "'.tr('Aggiungere alle fatture di vendita nello stato bozza?').'", "name": "accodare" ]}<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module=\''.$id_fatture.'\' AND is_fiscale = 1 ORDER BY name", "value": "'.$id_segment.'" ]}',
|
||||
'msg' => '{[ "type": "checkbox", "label": "'.tr('Aggiungere alle fatture esistenti non ancora emesse?').'", "placeholder": "'.tr('Aggiungere alle fatture di vendita nello stato bozza?').'", "name": "accodare" ]}<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module=\''.$id_fatture.'\' AND is_fiscale = 1 ORDER BY name", "value": "'.$id_segment.'" ]}',
|
||||
'button' => tr('Procedi'),
|
||||
'class' => 'btn btn-lg btn-warning',
|
||||
'blank' => false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user