Skip to content

✨Add COM AufAbschlag#265

Merged
hf-kklein merged 6 commits intomasterfrom
com-aufabschlag
Dec 20, 2021
Merged

✨Add COM AufAbschlag#265
hf-kklein merged 6 commits intomasterfrom
com-aufabschlag

Conversation

@hf-aschloegl
Copy link
Copy Markdown
Collaborator

Fixes #141

@hf-aschloegl hf-aschloegl marked this pull request as ready for review December 15, 2021 16:07
Copy link
Copy Markdown
Contributor

@hf-kklein hf-kklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

habs nicht in gänze durchgelesen. später ggf.

#: Bezeichnung des Auf-/Abschlags
bezeichnung: str = attr.ib(validator=attr.validators.instance_of(str))
#: Werte für die gestaffelten Auf/Abschläge.
staffeln: List[Preisstaffel] = attr.ib(validator=attr.validators.instance_of(List))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +40 to +44
#: Typ des Aufabschlages (z.B. absolut oder prozentual).
auf_abschlagstyp: Optional[AufAbschlagstyp] = attr.ib(
default=None, validator=attr.validators.optional(attr.validators.instance_of(AufAbschlagstyp))
)
#: Diesem Preis oder den Kosten ist der Auf/Abschlag zugeordnet. Z.B. Arbeitspreis, Gesamtpreis etc..
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#: Typ des Aufabschlages (z.B. absolut oder prozentual).
auf_abschlagstyp: Optional[AufAbschlagstyp] = attr.ib(
default=None, validator=attr.validators.optional(attr.validators.instance_of(AufAbschlagstyp))
)
#: Diesem Preis oder den Kosten ist der Auf/Abschlag zugeordnet. Z.B. Arbeitspreis, Gesamtpreis etc..
#: Typ des Aufabschlages (z.B. absolut oder prozentual)
auf_abschlagstyp: Optional[AufAbschlagstyp] = attr.ib(
default=None, validator=attr.validators.optional(attr.validators.instance_of(AufAbschlagstyp))
)
#: Diesem Preis oder den Kosten ist der Auf/Abschlag zugeordnet. Z.B. Arbeitspreis, Gesamtpreis etc.

kein punkt nach wort-konstrukten, die keine sätze sind

einheit_only_for_abschlagstyp_absolut,
],
)
""" Gibt an in welcher Währungseinheit der Auf/Abschlag berechnet wird. Euro oder Ct..
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
""" Gibt an in welcher Währungseinheit der Auf/Abschlag berechnet wird. Euro oder Ct..
""" Gibt an in welcher Währungseinheit der Auf/Abschlag berechnet wird.

das ist glaube ich langfristig auch ein Fall für #126

raise ValueError(f"List {attribute.name} must not be empty.")


def einheit_only_for_abschlagstyp_absolut(instance, attribute, value):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def einheit_only_for_abschlagstyp_absolut(instance, attribute, value):
def einheit_only_for_abschlagstyp_absolut(instance: AufAbschlag, attribute, value):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

udn noch importen

@hf-kklein hf-kklein merged commit c8f0c5f into master Dec 20, 2021
@hf-kklein hf-kklein deleted the com-aufabschlag branch December 20, 2021 08:12
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

Successfully merging this pull request may close these issues.

Implement COM AufAbschlag

2 participants