Ejemplo n.º 1
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