Exemple #1
0
    def get_data(self):
        if self.operation != "D":
            self.sid = Master.process_null_float(self.elem.find("sid"))
            self.condition_sequence_number = Master.process_null(
                self.elem.find("conditionSequenceNumber"))
            self.certificate_code = Master.process_null(
                self.elem.find("certificate/certificateCode"))
            self.certificate_type_code = Master.process_null(
                self.elem.find(
                    "certificate/certificateType/certificateTypeCode"))
            self.certificate = self.certificate_type_code + self.certificate_code
            self.action_code = Master.process_null(
                self.elem.find("measureAction/actionCode"))
            self.condition_code = Master.process_null(
                self.elem.find("measureConditionCode/conditionCode"))

            self.get_condition_code_description()
            self.get_action_code_description()

            self.output = ""
            if self.certificate == "":
                self.certificate = "n/a"
            self.output += "Certificate: " + self.certificate + ", "
            self.output += "Condition code: " + self.condition_code + " (" + self.condition_code_description + "), "
            self.output += "Action code: " + self.action_code + " (" + self.condition_code_description + ")<br /><br />"

        else:
            self.output = ""
 def get_data(self):
     if self.operation != "D":
         self.duty_amount = Master.process_null_float(
             self.elem.find("dutyAmount"))
         self.duty_expression_id = Master.process_null(
             self.elem.find("dutyExpression/dutyExpressionId"))
         self.measurement_unit_code = Master.process_null(
             self.elem.find("measurementUnit/measurementUnitCode"))
         self.measurement_unit_qualifier_code = Master.process_null(
             self.elem.find(
                 "measurementUnitQualifier/measurementUnitQualifierCode"))
         self.monetary_unit_code = Master.process_null(
             self.elem.find("monetaryUnit/monetaryUnitCode"))
         self.get_duty_string()
     else:
         self.duty_string = None