Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Automated Moneyplex Export #2

Open
9 tasks done
roquegv opened this issue Aug 31, 2023 · 0 comments
Open
9 tasks done

Feature: Automated Moneyplex Export #2

roquegv opened this issue Aug 31, 2023 · 0 comments

Comments

@roquegv
Copy link
Collaborator

roquegv commented Aug 31, 2023

General purpose: add a function to export the Payment Requests entries into a Excel file.

TODOs:

  • Add a button on the listview of Payment Request, named "Noneyplexexport gebuchter Einträge"
  • Use the provided SQL query to get the data and download a Excel file.
  • Only documents with "Für Moneyplex exportiert" == 0 should be exported.
  • When exported, this field turns to 1.
  • Add new fields to the Payment Request doctype.
  • The exported file should keep the order according to creation datetime.
  • Generate the Payment Entries after exporting #6
  • The field "Für Moneyplex exportiert" should also be created on Payment Entry.
  • Disable the sending of email when submitting the Payment Request.

SQL query:

SELECT
    `tabPayment Request`.company AS "Kontoname",
    `tabPayment Request`.bank_account_no AS "Kontonummer",
    `tabPayment Request`.branch_code AS "Bankleitzahl",
--    ursprüngliche Variante:
--    `tabPayment Request`.transaction_date AS "Datum",
--    `tabPayment Request`.valuta AS "Valuta",
    TO_CHAR(`tabPayment Request`.transaction_date, 'DD.MM.YYYY') AS "Datum",
    TO_CHAR(`tabPayment Request`.valuta, 'DD.MM.YYYY') AS "Valuta",
    `tabPayment Request`.supplier_name AS "Name",
    `tabPayment Request`.party_iban AS "Iban",
    `tabPayment Request`.party_bic AS "Bic",
    `tabPayment Request`.reference_name AS "Zweck",
    `tabPayment Request`.mode_of_payment AS "Kategorie",
-- ursprüngliche Variante:
--    `tabPayment Request`.grand_total AS "Betrag",
    FORMAT(`tabPayment Request`.grand_total, 2, 'de_DE') AS "Betrag",
    `tabPayment Request`.currency AS "Währung"
FROM
    `tabPayment Request`
WHERE
    `tabPayment Request`.docstatus = 1 AND `tabPayment Request`._für_moneyplex_exportiert = 0

New fields in Payment Request:

Line 3:
Label: Valuta
Name:valuta
Type:Date

Line 7:
Label: Company
Name: company
Type: Link
Description: Wird über den Bankaccount des eigenen Unternehmens gezogen.
Fetch From; bank_account.company
Options: Company

Line 8:
Label:  Für Moneyplex exportiert
Name: _für_moneyplex_exportiert
Type: Check
Activated options:
In List View
Allow on Submit

Line 12:
Label: Supplier Name
Name:supplier_name
Type: Data
Description: Leeres Feld? Dann muss noch auf dem bei Partei eingetragenen Lieferanten das Feld "Standard-Bankkonto des Unternehmens" ausgefüllt werden. (Bankkonto, IBAN, BIC werden danach ebenfalls gezogen.)
In List View x
Fetch from party.supplier_name

Line 13:
Label: Bank Account
Name:party_bank_account
Type:Link
Options: Bank Account
Fetch from: party.default_bank_account

Line 14:
Label: IBAN
Name: party_iban
Type:Data
Detch from: party_bank_account.iban

Line 15:
Label: BIC
Name:party_bic
Type: Data
Fetch from: party_bank_account.branch_code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant