Commit 29-07-24

This commit is contained in:
lienjukaisim 2024-07-29 21:57:15 +02:00
parent 8017760499
commit 815333667a

View File

@ -70,7 +70,7 @@ struct SituationPS {
code_agrement_2: String,
code_agrement_3: String,
habilitation_à_signer_une_facture: String,
habilitation_à_signer_un_lot: String
habilitation_à_signer_un_lot: String,
}
impl Default for SituationPS {
@ -96,7 +96,7 @@ impl Default for SituationPS {
code_agrement_2: String::new(),
code_agrement_3: String::new(),
habilitation_à_signer_une_facture: String::new(),
habilitation_à_signer_un_lot: String::new()
habilitation_à_signer_un_lot: String::new(),
}
}
}
@ -213,7 +213,8 @@ pub fn decode_zone_memoire(bytes: &[u8]) {
String::from_utf8_lossy(&bytes_champ).to_string();
}
6 => {
carte_ps.titulaire.nom_du_ps = String::from_utf8_lossy(&bytes_champ).to_string();
carte_ps.titulaire.nom_du_ps =
String::from_utf8_lossy(&bytes_champ).to_string();
}
7 => {
carte_ps.titulaire.prenom_du_ps =
@ -227,12 +228,125 @@ pub fn decode_zone_memoire(bytes: &[u8]) {
2 => match num_champ {
1 => {
carte_ps.situations.push(SituationPS::default());
carte_ps.situations.last_mut().unwrap().numero_logique_de_la_situation_de_facturation_du_ps = bytes_champ[0];
carte_ps
.situations
.last_mut()
.unwrap()
.numero_logique_de_la_situation_de_facturation_du_ps =
bytes_champ[0];
}
2 => {
carte_ps.situations.last_mut().unwrap().mode_d_exercice =
String::from_utf8_lossy(&bytes_champ).to_string();
}
3 => {
carte_ps.situations.last_mut().unwrap().statut_d_exercice =
String::from_utf8_lossy(&bytes_champ).to_string();
}
4 => {
carte_ps.situations.last_mut().unwrap().secteur_d_activite =
String::from_utf8_lossy(&bytes_champ).to_string();
}
5 => {
carte_ps
.situations
.last_mut()
.unwrap()
.type_d_identification_structure =
String::from_utf8_lossy(&bytes_champ).to_string();
}
6 => {
carte_ps
.situations
.last_mut()
.unwrap()
.numero_d_identification_structure =
String::from_utf8_lossy(&bytes_champ).to_string();
}
7 => {
carte_ps
.situations
.last_mut()
.unwrap()
.cle_du_numero_d_identification_structure =
String::from_utf8_lossy(&bytes_champ).to_string();
}
8 => {
carte_ps
.situations
.last_mut()
.unwrap()
.raison_sociale_structure =
String::from_utf8_lossy(&bytes_champ).to_string();
}
9 => {
carte_ps
.situations
.last_mut()
.unwrap()
.numero_d_identification_de_facturation_du_ps =
String::from_utf8_lossy(&bytes_champ).to_string();
}
10 => {
carte_ps
.situations
.last_mut()
.unwrap()
.cle_du_numero_d_identification_de_facturation_du_ps =
String::from_utf8_lossy(&bytes_champ).to_string();
}
11 => {
carte_ps
.situations
.last_mut()
.unwrap()
.numero_d_identification_du_ps_remplaçant =
String::from_utf8_lossy(&bytes_champ).to_string();
}
12 => {
carte_ps
.situations
.last_mut()
.unwrap()
.cle_du_numero_d_identification_du_ps_remplaçant =
String::from_utf8_lossy(&bytes_champ).to_string();
}
13 => {
carte_ps.situations.last_mut().unwrap().code_conventionnel =
String::from_utf8_lossy(&bytes_champ).to_string();
}
14 => {
carte_ps.situations.last_mut().unwrap().code_specialite =
String::from_utf8_lossy(&bytes_champ).to_string();
}
15 => {
carte_ps.situations.last_mut().unwrap().code_zone_tarifaire =
String::from_utf8_lossy(&bytes_champ).to_string();
}
16 => {
carte_ps.situations.last_mut().unwrap().code_zone_ik =
String::from_utf8_lossy(&bytes_champ).to_string();
}
17 => {
carte_ps.situations.last_mut().unwrap().code_agrement_1 =
String::from_utf8_lossy(&bytes_champ).to_string();
}
18 => {
carte_ps.situations.last_mut().unwrap().code_agrement_2 =
String::from_utf8_lossy(&bytes_champ).to_string();
}
19 => {
carte_ps.situations.last_mut().unwrap().code_agrement_3 =
String::from_utf8_lossy(&bytes_champ).to_string();
}
20 => {
carte_ps.situations.last_mut().unwrap().habilitation_à_signer_une_facture =
String::from_utf8_lossy(&bytes_champ).to_string();
}
21 => {
carte_ps.situations.last_mut().unwrap().habilitation_à_signer_un_lot =
String::from_utf8_lossy(&bytes_champ).to_string();
}
_ => (),
},
_ => (),