mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-25 06:00:28 +01:00
verbindlichkeit date assistant
This commit is contained in:
parent
23b9fa781b
commit
50d8646d70
@ -62,7 +62,7 @@
|
||||
{|Rechnungsdatum|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="rechnungsdatum" id="rechnungsdatum" value="[RECHNUNGSDATUM]" size="20" [SAVEDISABLED]>
|
||||
<input type="text" name="rechnungsdatum" id="rechnungsdatum" value="[RECHNUNGSDATUM]" size="20" [SAVEDISABLED] required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -103,7 +103,7 @@
|
||||
{|Zahlbar bis|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="zahlbarbis" id="zahlbarbis" value="[ZAHLBARBIS]" size="20" [SAVEDISABLED]>
|
||||
<input type="text" name="zahlbarbis" id="zahlbarbis" value="[ZAHLBARBIS]" size="20" [SAVEDISABLED]> <input type="number" name="zahlbarbis_tage" id="zahlbarbis_tage" size="4" [SAVEDISABLED]> Tage
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -119,7 +119,7 @@
|
||||
{|Skonto bis|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="skontobis" id="skontobis" value="[SKONTOBIS]" size="20" [SAVEDISABLED]>
|
||||
<input type="text" name="skontobis" id="skontobis" value="[SKONTOBIS]" size="20" [SAVEDISABLED]> <input type="number" name="skontobis_tage" id="skontobis_tage" size="4" [SAVEDISABLED]> Tage
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -597,11 +597,26 @@ class Verbindlichkeit {
|
||||
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$projekt,true);
|
||||
$input['kostenstelle'] = $this->app->DB->Select("SELECT id FROM kostenstellen WHERE nummer = '".$kostenstelle."'");
|
||||
} else {
|
||||
$input['adresse'] = $this->app->erp->ReplaceLieferantennummer(true,$input['adresse'],true); // Parameters: Target db?, value, from form?
|
||||
|
||||
$input['rechnungsdatum'] = $this->app->erp->ReplaceDatum(true,$input['rechnungsdatum'],true); // Parameters: Target db?, value, from form?
|
||||
$input['eingangsdatum'] = $this->app->erp->ReplaceDatum(true,$input['eingangsdatum'],true); // Parameters: Target db?, value, from form?
|
||||
$input['skontobis'] = $this->app->erp->ReplaceDatum(true,$input['skontobis'],true); // Parameters: Target db?, value, from form?
|
||||
$input['zahlbarbis'] = $this->app->erp->ReplaceDatum(true,$input['zahlbarbis'],true); // Parameters: Target db?, value, from form?
|
||||
|
||||
if(!empty($input['zahlbarbis_tage'])) {
|
||||
$zahlbarbis = date_create_from_format('Y-m-d', $input['rechnungsdatum']);
|
||||
date_add($zahlbarbis,date_interval_create_from_date_string($input['zahlbarbis_tage']." days"));
|
||||
$input['zahlbarbis'] = date_format($zahlbarbis, 'Y-m-d');
|
||||
}
|
||||
unset($input['zahlbarbis_tage']);
|
||||
if(!empty($input['skontobis_tage'])) {
|
||||
$skontobis = date_create_from_format('Y-m-d', $input['rechnungsdatum']);
|
||||
date_add($skontobis,date_interval_create_from_date_string($input['skontobis_tage']." days"));
|
||||
$input['skontobis'] = date_format($skontobis, 'Y-m-d');
|
||||
}
|
||||
unset($input['skontobis_tage']);
|
||||
|
||||
$input['adresse'] = $this->app->erp->ReplaceLieferantennummer(true,$input['adresse'],true); // Parameters: Target db?, value, from form?
|
||||
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true);
|
||||
$input['kostenstelle'] = $this->app->DB->Select("SELECT id FROM kostenstellen WHERE nummer = '".$input['kostenstelle']."'");
|
||||
$input['bestellung'] = $this->app->erp->ReplaceBestellung(true,$input['bestellung'],true);
|
||||
@ -1159,10 +1174,12 @@ class Verbindlichkeit {
|
||||
$input['adresse'] = $this->app->Secure->GetPOST('adresse');
|
||||
$input['rechnung'] = $this->app->Secure->GetPOST('rechnung');
|
||||
$input['zahlbarbis'] = $this->app->Secure->GetPOST('zahlbarbis');
|
||||
$input['zahlbarbis_tage'] = $this->app->Secure->GetPOST('zahlbarbis_tage');
|
||||
$input['betrag'] = $this->app->Secure->GetPOST('betrag');
|
||||
$input['waehrung'] = $this->app->Secure->GetPOST('waehrung');
|
||||
$input['skonto'] = $this->app->Secure->GetPOST('skonto');
|
||||
$input['skontobis'] = $this->app->Secure->GetPOST('skontobis');
|
||||
$input['skontobis_tage'] = $this->app->Secure->GetPOST('skontobis_tage');
|
||||
$input['projekt'] = $this->app->Secure->GetPOST('projekt');
|
||||
$input['zahlungsweise'] = $this->app->Secure->GetPOST('zahlungsweise');
|
||||
$input['eingangsdatum'] = $this->app->Secure->GetPOST('eingangsdatum');
|
||||
|
Loading…
Reference in New Issue
Block a user