verbindlichkeit set sachkonto of multi positions

This commit is contained in:
OpenXE 2024-01-13 12:46:14 +01:00
parent 602bc38585
commit f148fbdf08
2 changed files with 25 additions and 0 deletions

View File

@ -61,6 +61,12 @@
<tr [POSITIONHINZUFUEGENHIDDEN]> <tr [POSITIONHINZUFUEGENHIDDEN]>
<td><button [SAVEDISABLED] name="submit" value="positionen_entfernen" class="ui-button-icon" style="width:100%;">Entfernen</button></td> <td><button [SAVEDISABLED] name="submit" value="positionen_entfernen" class="ui-button-icon" style="width:100%;">Entfernen</button></td>
</tr> </tr>
<tr [POSITIONHINZUFUEGENHIDDEN]>
<td><input type="text" name="positionen_sachkonto" id="positionen_sachkonto" value="" size="20"></td>
</tr>
<tr [POSITIONHINZUFUEGENHIDDEN]>
<td><button [SAVEDISABLED] name="submit" value="positionen_kontorahmen_setzen" class="ui-button-icon" style="width:100%;">Sachkonto setzen</button></td>
</tr>
</table> </table>
</fieldset> </fieldset>
</div> </div>

View File

@ -799,6 +799,25 @@ class Verbindlichkeit {
} }
break; break;
case 'positionen_kontorahmen_setzen':
$freigabe = $this->app->DB->SelectArr("SELECT rechnungsfreigabe, freigabe FROM verbindlichkeit WHERE id =".$id)[0];
if ($freigabe['rechnungsfreigabe'] || $freigabe['freigabe']) {
break;
}
// Process multi action
$ids = $this->app->Secure->GetPOST('auswahl');
if (!is_array($ids)) {
break;
}
$positionen_sachkonto = $this->app->Secure->GetPOST('positionen_sachkonto');
$positionen_kontorahmen = $this->app->erp->ReplaceKontorahmen(true,$positionen_sachkonto,false);
foreach ($ids as $posid) {
$sql = "UPDATE verbindlichkeit_position SET kontorahmen = '".$positionen_kontorahmen."'";
$this->app->DB->Update($sql);
}
break;
} }