Skip to content

Commit

Permalink
feat: currency field integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
dehenne committed Mar 26, 2019
1 parent 5f1d35e commit 160835b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
3 changes: 3 additions & 0 deletions database.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<field type="FLOAT NOT NULL">isbrutto</field>

<field type="TEXT NOT NULL">currency_data</field>
<field type="VARCHAR(10) NULL">currency</field>

<field type="FLOAT NOT NULL">nettosum</field>
<field type="FLOAT NOT NULL">nettosubsum</field>
Expand Down Expand Up @@ -112,7 +113,9 @@
<field type="TEXT NULL">comments</field>
<field type="TEXT NULL">customer_data</field>
<field type="FLOAT NULL">isbrutto</field>

<field type="TEXT NULL">currency_data</field>
<field type="VARCHAR(10) NULL">currency</field>

<field type="FLOAT NULL">nettosum</field>
<field type="FLOAT NULL">nettosubsum</field>
Expand Down
19 changes: 10 additions & 9 deletions src/QUI/ERP/Accounting/Invoice/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
*/
class Invoice extends QUI\QDOM
{
const PAYMENT_STATUS_OPEN = 0;
const PAYMENT_STATUS_PAID = 1;
const PAYMENT_STATUS_PART = 2;
const PAYMENT_STATUS_ERROR = 4;
const PAYMENT_STATUS_OPEN = 0;
const PAYMENT_STATUS_PAID = 1;
const PAYMENT_STATUS_PART = 2;
const PAYMENT_STATUS_ERROR = 4;
const PAYMENT_STATUS_CANCELED = 5;
const PAYMENT_STATUS_DEBIT = 11;
const PAYMENT_STATUS_DEBIT = 11;

// const PAYMENT_STATUS_CANCEL = 3;
// const PAYMENT_STATUS_STORNO = 3; // Alias for cancel
// const PAYMENT_STATUS_CREATE_CREDIT = 5;

const DUNNING_LEVEL_OPEN = 0; // No Dunning -> Keine Mahnung
const DUNNING_LEVEL_REMIND = 1; // Payment reminding -> Zahlungserinnerung
const DUNNING_LEVEL_DUNNING = 2; // Dunning -> Erste Mahnung
const DUNNING_LEVEL_DUNNING2 = 3; // Second dunning -> Zweite Mahnung
const DUNNING_LEVEL_OPEN = 0; // No Dunning -> Keine Mahnung
const DUNNING_LEVEL_REMIND = 1; // Payment reminding -> Zahlungserinnerung
const DUNNING_LEVEL_DUNNING = 2; // Dunning -> Erste Mahnung
const DUNNING_LEVEL_DUNNING2 = 3; // Second dunning -> Zweite Mahnung
const DUNNING_LEVEL_COLLECTION = 4; // Collection -> Inkasso

/**
Expand Down Expand Up @@ -621,6 +621,7 @@ public function copy($PermissionUser = null, $globalProcessId = false)
'customer_data' => $currentData['customer_data'],
'isbrutto' => $currentData['isbrutto'],
'currency_data' => $currentData['currency_data'],
'currency' => $currentData['currency'],
'nettosum' => $currentData['nettosum'],
'nettosubsum' => $currentData['nettosubsum'],
'subsum' => $currentData['subsum'],
Expand Down
2 changes: 2 additions & 0 deletions src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ public function update($PermissionUser = null)
// Calc data
'isbrutto' => $isBrutto,
'currency_data' => json_encode($listCalculations['currencyData']),
'currency' => $listCalculations['currencyData']['code'],
'nettosum' => $listCalculations['nettoSum'],
'subsum' => InvoiceUtils::roundInvoiceSum($listCalculations['subSum']),
'sum' => InvoiceUtils::roundInvoiceSum($listCalculations['sum']),
Expand Down Expand Up @@ -1023,6 +1024,7 @@ public function post($PermissionUser = null)
// calculation data
'isbrutto' => $isBrutto,
'currency_data' => json_encode($listCalculations['currencyData']),
'currency' => $listCalculations['currencyData']['code'],
'nettosum' => $listCalculations['nettoSum'],
'nettosubsum' => $listCalculations['nettoSubSum'],
'subsum' => InvoiceUtils::roundInvoiceSum($listCalculations['subSum']),
Expand Down
1 change: 1 addition & 0 deletions src/QUI/ERP/Accounting/Invoice/Search/InvoiceSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ protected function getAllowedFields()
'isbrutto',

'currency_data',
'currency',

'nettosum',
'nettosubsum',
Expand Down

0 comments on commit 160835b

Please sign in to comment.