Ejemplo n.º 1
0
 def get_record(self):
     record = Record(aeat347.PROPERTY_RECORD)
     record.party_nif = self.party_vat
     record.representative_nif = self.representative_vat
     record.party_name = self.party_name
     record.amount = self.amount
     record.situation = self.situation
     record.cadaster_number = self.cadaster_number
     record.road_type = self.road_type
     record.street = self.street
     record.number_type = self.number_type
     record.number = self.number
     record.number_qualifier = self.number_qualifier
     record.block = self.block
     record.doorway = self.doorway
     record.stair = self.stair
     record.floor = self.floor
     record.door = self.door
     record.complement = self.complement
     record.city = self.city
     record.municipality = self.municipality
     record.municipality_code = self.municipality_code
     record.province_code = self.province_code
     record.zip = self.zip
     return record
Ejemplo n.º 2
0
    def setUp(self):
        self.data = read_flat("130.txt")

        record = Record(aeat130.HEADER_RECORD)
        record.fiscalyear = "2015"
        record.period = "1T"
        self.header_record = record

        record = Record(aeat130.RECORD)
        record.type = "U"
        record.nif = "12345678A"
        record.surname = "SURNAME"
        record.name = "NAME"
        record.fiscalyear = "2015"
        record.period = "1T"
        record.economic_activity_income = Decimal("4177.52")
        record.economic_activity_deduction_expenses = Decimal("1405.97")
        record.economic_activity_taxable_amount = Decimal("2771.55")
        record.economic_activity_20_percent_taxable_amount = Decimal("554.31")
        record.economic_activity_withholdings_y2d = Decimal("122.85")
        record.economic_activity_payable_amount = Decimal("431.46")
        record.withholdings = Decimal("431.46")
        record.deduction_article_110dot3 = Decimal("100.00")
        record.difference = Decimal("331.46")
        record.amount = Decimal("331.46")
        record.payable_amount = Decimal("331.46")
        record.complementary = False
        record.bank_account = "ES1122223333441111111111"
        self.record = record

        record = Record(aeat130.FOOTER_RECORD)
        record.fiscalyear = "2015"
        record.period = "1T"
        self.footer_record = record
Ejemplo n.º 3
0
 def get_record(self):
     record = Record(aeat347.PARTY_RECORD)
     record.party_nif = self.party_vat
     record.community_vat = self.community_vat or ''
     record.representative_nif = self.representative_vat or ''
     record.party_name = remove_accents(self.party_name)
     record.province_code = self.province_code
     if self.country_code == 'ES':
         record.country_code = ''
     else:
         record.country_code = self.country_code
     record.operation_key = self.operation_key
     record.amount = self.amount
     record.insurance = self.insurance
     record.business_premises_rent = self.business_premises_rent
     record.cash_amount = self.cash_amount or _ZERO
     record.vat_liable_property_amount = self.property_amount \
         or Decimal('0.0')
     record.fiscalyear_cash_operation = str(
         self.fiscalyear_code_cash_operation or '')
     record.first_quarter_amount = self.first_quarter_amount
     record.first_quarter_property_amount = (
         self.first_quarter_property_amount)
     record.second_quarter_amount = self.second_quarter_amount
     record.second_quarter_property_amount = (
         self.second_quarter_property_amount)
     record.third_quarter_amount = self.third_quarter_amount
     record.third_quarter_property_amount = (
         self.third_quarter_property_amount)
     record.fourth_quarter_amount = self.fourth_quarter_amount
     record.fourth_quarter_property_amount = (
         self.fourth_quarter_property_amount)
     record.cash_vat_operation = self.cash_vat_operation
     record.cash_vat_criteria = (self.cash_vat_criteria or Decimal('0.0')
         if self.cash_vat_operation else Decimal('0.0'))
     record.tax_person_operation = self.tax_person_operation
     record.related_goods_operation = self.related_goods_operation
     return record