Keep compta with Pierre Grimaud API
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1096c01f44
commit
70e5347878
@ -99,6 +99,13 @@ func convertLineType(old string) string {
|
|||||||
|
|
||||||
func convertCode(t, code string) string {
|
func convertCode(t, code string) string {
|
||||||
if !strings.HasPrefix(code, "line:IDFM:") {
|
if !strings.HasPrefix(code, "line:IDFM:") {
|
||||||
|
if t == "tram" && !strings.HasPrefix(code, "T") {
|
||||||
|
code = "T" + code
|
||||||
|
}
|
||||||
|
if t == "noctilien" && !strings.HasPrefix(code, "N") {
|
||||||
|
code = "N" + code
|
||||||
|
}
|
||||||
|
|
||||||
if len(code) != 6 || !strings.HasPrefix(code, "C") {
|
if len(code) != 6 || !strings.HasPrefix(code, "C") {
|
||||||
code = searchLine(t, code)
|
code = searchLine(t, code)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user