payroll page mapping finished

This commit is contained in:
hysn99
2024-04-03 15:07:22 +03:00
parent a415c8ad92
commit 055ac013f9
6 changed files with 209 additions and 366 deletions

View File

@@ -76,6 +76,7 @@ func (s *Srv) Rpa(companyName string, month float64, year float64) error {
return nil
}
err = b.PayrollPageLogin()
slog.Debug("inputs", "year", year, "month", month)
@@ -102,7 +103,7 @@ func (s *Srv) Rpa(companyName string, month float64, year float64) error {
if rows[0][0] == "" {
rows = rows[1:]
}
var insertMessage []string
// data := make([]*model.Bordro, 0) // []*Bordro türünde bir dilim oluştur
for i := 1; i < len(rows); i++ {
brd := &bot.LucaBordro{
@@ -125,10 +126,18 @@ func (s *Srv) Rpa(companyName string, month float64, year float64) error {
}
}
err = b.BordroYazPage(int(month), int(year), brd)
message, err := b.BordroYaz(int(month), int(year), brd)
if len(message) > 0 {
insertMessage = append(insertMessage, message...)
}
if err != nil {
fmt.Print(err)
}
}
if len(insertMessage) > 0 && err != nil {
return nil
}
if err != nil {
//emitLog(err.message)
return err