Exemplo n.º 1
0
def test1():
    xmv_alt = XMietverhaeltnis()
    xmv_alt.id = 11
    xmv_alt.mv_id = "knacker_panzer"
    xmv_alt.von = "2021-11-01"
    xmv_alt.bis = "2021-11-02"

    xmv_neu = XMietverhaeltnis()
    xmv_neu.id = 0
    xmv_neu.mv_id = ""
    xmv_neu.mobj_id = "bueb"
    xmv_neu.von = "2022-11-02"
    xmv_neu.name = "Schnörpfel"
    xmv_neu.vorname = "Schnurpf"
    xmv_neu.nettomiete = 500.00
    xmv_neu.nkv = 100.00

    mwdata = XMieterwechsel(xmv_alt, xmv_neu)

    retVal: ReturnValue = MietverhaeltnisServices.processMieterwechsel(mwdata)
    print(retVal.exceptiontype, ": ", retVal.errormessage)
Exemplo n.º 2
0
def test2():
    xmv_alt = XMietverhaeltnis()
    xmv_alt.id = 11
    xmv_alt.mv_id = "amaral_cynthia"
    xmv_alt.von = "2019-01-01"
    xmv_alt.bis = "2021-12-31"  # <--- sei durch den Dialog so eingestellt

    xmv_neu = XMietverhaeltnis()
    xmv_neu.id = 0
    xmv_neu.mv_id = "angstrumpf_pippi"
    xmv_neu.mobj_id = "kleist_32"
    xmv_neu.von = "2022-01-01"
    xmv_neu.name = "Angstrumpf"
    xmv_neu.vorname = "Pippi"
    xmv_neu.nettomiete = 300.0
    xmv_neu.nkv = 88.00

    mwdata = XMieterwechsel(xmv_alt, xmv_neu)

    retVal: ReturnValue = MietverhaeltnisServices.processMieterwechsel(mwdata)
    print(retVal.exceptiontype, ": ", retVal.errormessage)
Exemplo n.º 3
0
 def _guiToData(self, x: XMietverhaeltnis):
     """
     Überträgt die Änderungen, die der User im GUI gemacht hat, in das
     übergebene XMietverhaeltnis-Objekt
     :param x: XMietverhaeltnis-Objekt, in das die geänderten Daten übertragen werden
     :return:
     """
     x.von = self._sdBeginnMietverh.getDate()
     x.bis = self._sdEndeMietverh.getDate()
     x.name = self._edMieterName_1.text()
     x.vorname = self._edMieterVorname_1.text()
     x.name2 = self._edMieterName_2.text()
     x.vorname2 = self._edMieterVorname_2.text()
     x.telefon = self._edMieterTelefon.text()
     x.mobil = self._edMieterMobil.text()
     x.mailto = self._edMieterMailto.text()
     x.anzahl_pers = self._edAnzPers.getIntValue()
     x.nettomiete = self._edNettomiete.getFloatValue()
     x.nkv = self._edNkv.getFloatValue()
     x.kaution = self._edKaution.getIntValue()
     x.kaution_bezahlt_am = self._sdKautionBezahltAm.getDate()
     x.bemerkung1 = self._txtBemerkung1.toPlainText()
     x.bemerkung2 = self._txtBemerkung2.toPlainText()