-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(DATEV): against account for opening entries (#35941)
* fix: add missing german translations * feat(DATEV): against account for opening entries Allow to specify a separate temporary against account for opening entries * feat(DATEV Settings): validate account no. length * style: format with black * style: format with black * test: new settings field, rename filter
- Loading branch information
1 parent
18c3a66
commit 0602ddc
Showing
5 changed files
with
62 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
|
||
# import frappe | ||
from frappe import _, throw | ||
from frappe.model.document import Document | ||
|
||
|
||
class DATEVSettings(Document): | ||
pass | ||
def validate(self): | ||
if ( | ||
self.temporary_against_account_number | ||
and len(self.temporary_against_account_number) != self.account_number_length | ||
): | ||
throw( | ||
_("Temporary Against Account Number must be {0} digits long").format( | ||
self.account_number_length | ||
) | ||
) | ||
|
||
if ( | ||
self.opening_against_account_number | ||
and len(self.opening_against_account_number) != self.account_number_length | ||
): | ||
throw( | ||
_("Opening Against Account Number must be {0} digits long").format(self.account_number_length) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters