public string GetToString(Societe societe, DeclarationFc declaration, Exercice exercice) { if (societe == null || declaration == null || exercice == null) { return(string.Empty); } var result = string.Empty; result = "DF"; result += societe.MatriculFiscal.PadLeft(7, '0'); result += societe.MatriculCle.PadLeft(1, '0'); result += societe.MatriculCategorie.PadLeft(1, '0'); result += societe.MatriculEtablissement.PadLeft(3, '0'); result += exercice.Annee.PadLeft(4, '0'); result += "T"; result += declaration.Trimestre.ToString().PadLeft(1); result += NumeroOrdre.ToString().PadLeft(6, '0'); result += NumeroFacture.PadRight(20, ' '); result += DateFacture.ToString("ddMMyyyy"); result += ((int)TypeClient).ToString("0"); result += IdentifiantClient.PadRight(13, ' '); result += NomPrenomClient.PadRight(40, ' '); result += AdresseClient.PadLeft(120, ' '); result += NumeroAutorisation.PadRight(20, ' '); result += DateAutorisation.ToString("ddMMyyyy"); result += (PrixVenteHt * 1000).ToString("0").PadLeft(15, '0'); result += (TauxFodec * 1000).ToString("0").PadLeft(5, '0'); result += (MontantFodec * 1000).ToString("0").PadLeft(15, '0'); result += (TauxDroitConsommation * 1000).ToString("0").PadLeft(5, '0'); result += (MontantDroitConsommation * 1000).ToString("0").PadLeft(15, '0'); result += (TauxTva * 1000).ToString("0").PadLeft(5, '0'); result += (MontantTva * 1000).ToString("0").PadLeft(15, '0'); return(result); }
public string GetToString(Societe societe, DeclarationBc declaration, Exercice exercice) { if (societe == null || declaration == null || exercice == null) { return(string.Empty); } string result = "DF"; result += societe.MatriculFiscal.PadLeft(7, '0'); result += societe.MatriculCle.PadLeft(1, '0'); result += societe.MatriculCategorie.PadLeft(1, '0'); result += societe.MatriculEtablissement.PadLeft(3, '0'); result += exercice.Annee.PadLeft(4, '0'); result += "T"; result += declaration.Trimestre.ToString().PadLeft(1); result += NumeroOrdre.ToString().PadLeft(6, '0'); result += NumeroAutorisation.PadRight(30, ' '); result += NumeroBonCommande.PadLeft(13, ' '); result += DateBonCommande.ToString("ddMMyyyy"); result += Identifiant.PadLeft(13, '0'); result += RaisonSocialFournisseur.PadRight(40, ' '); result += NumeroFacture.PadLeft(30, ' '); result += DateFacture.ToString("ddMMyyyy"); result += (PrixAchatHorsTaxe * 1000).ToString("0").PadLeft(15, '0'); result += (MontantTva * 1000).ToString("0").PadLeft(15, '0'); result += "<"; result += ObjetFacture.PadRight(320, ' '); result += "/>"; return(result); }