s and g , n and b distinction was made
This commit is contained in:
@@ -316,6 +316,7 @@ func (l *Luca) Login(company company.Company, month float64, year float64) error
|
||||
}
|
||||
|
||||
func (l *Luca) BordroTableMaping(frame *rod.Page, b *LucaBordro) ([]BordroPageScript, error) {
|
||||
scriptIndexArray = []BordroPageScript{}
|
||||
table, err := frame.Elements("#scroll > div > table > tbody > tr > td > table > tbody > tr > td") //table kontrol et var mı yok mu diye
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -647,6 +648,9 @@ func (l *Luca) BordroYaz(month, year int, b *LucaBordro, lastItem bool) error {
|
||||
var elementInsertControl bool = true
|
||||
var displayControl bool = true
|
||||
tt := v.String()
|
||||
if tt == "0" {
|
||||
continue
|
||||
}
|
||||
if k == "Normal Gün" {
|
||||
continue
|
||||
}
|
||||
@@ -677,8 +681,26 @@ func (l *Luca) BordroYaz(month, year int, b *LucaBordro, lastItem bool) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// //s ve g olunca i yi çalıştır n ve b olunca i+1 i
|
||||
if hashValue == "S" || hashValue == "G" {
|
||||
if (hashValue == "S" || hashValue == "G") && k != "ARGE-Destek ve Tasarım Faaliyeti" {
|
||||
if rsp[i+1].Value != hashValue {
|
||||
newBordroPage, err := frame3.Element("body > form > table > tbody > tr.altBar.alt-button-bar > th > table > tbody > tr > td:nth-child(1) > button:nth-child(4)")
|
||||
newBordroPage.WaitLoad()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
newBordroPage.Click(proto.InputMouseButtonLeft, 1)
|
||||
err = WaitLoad(frame3)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = ClickItem(frame3, "body > form > table > tbody > tr.altBar.alt-button-bar > th > table > tbody > tr > td:nth-child(1) > button:nth-child(3)", 1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return errors.New(k + hashValue + "Sütun Bulunamadı")
|
||||
}
|
||||
el, err = frame3.Element("#" + rsp[i].Index)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -711,6 +733,14 @@ func (l *Luca) BordroYaz(month, year int, b *LucaBordro, lastItem bool) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
if k == "ARGE-Destek ve Tasarım Faaliyeti" {
|
||||
if hashValue == "S" {
|
||||
el, err = frame3.Element("#" + rsp[i+1].Index)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
value := v.String()
|
||||
if strings.Contains(value, ".") {
|
||||
value = strings.Replace(value, ".", ",", -1)
|
||||
@@ -775,10 +805,10 @@ func (l *Luca) BordroYaz(month, year int, b *LucaBordro, lastItem bool) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
saveButtonMessage, err := ReceiveDOMMessages(frame3, ".alert-container", "innerText")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
saveButtonMessage, _ := ReceiveDOMMessages(frame3, ".alert-container", "innerText")
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
if saveButtonMessage != "Bordro hesaplanıyor." {
|
||||
newBordroPage, err := frame3.Element("body > form > table > tbody > tr.altBar.alt-button-bar > th > table > tbody > tr > td:nth-child(1) > button:nth-child(4)")
|
||||
newBordroPage.WaitLoad()
|
||||
|
||||
Reference in New Issue
Block a user