Kaynağa Gözat

bugfix for xero refresh token when things goes wrong, email is sent to patrick for manual operation.

master
sp 3 yıl önce
ebeveyn
işleme
5d6a450011
3 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. +1
    -0
      .idea/vcs.xml
  2. +3
    -1
      Storage.php
  3. +2
    -3
      XeroOauth2Timesheet.php

+ 1
- 0
.idea/vcs.xml Dosyayı Görüntüle

@@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/ts" vcs="Git" />
</component>
</project>

+ 3
- 1
Storage.php Dosyayı Görüntüle

@@ -88,7 +88,9 @@ class StorageClass
$this->write_json();
}


public function tokenExpiresHumanRedable(){
return $this->oauth2['expires_human'];
}
private function getExpiresHuman($time_stamp) {
$expire = date("Y-m-d H:i:s", $time_stamp);
$utc_date = \DateTime::createFromFormat(

+ 2
- 3
XeroOauth2Timesheet.php Dosyayı Görüntüle

@@ -67,7 +67,7 @@ class XeroOauth2Timesheet
$ts->setStatus(\XeroAPI\XeroPHP\Models\PayrollAu\TimesheetStatus::DRAFT);
}
//adding lines
$tsLines = [];
$tsLines=[];
foreach ($rateshours as $rateId => $hours)
{
$ts_line = new \XeroAPI\XeroPHP\Models\PayrollAu\TimesheetLine;
@@ -148,7 +148,6 @@ class XeroOauth2Timesheet
}
}
$this->apiPayrollAu->createTimesheet($this->oauth2->getTenantId(),$to_save);
return;
}

public function approve_all(){
@@ -193,4 +192,4 @@ class XeroOauth2Timesheet
$line->setNumberOfUnits($unit);
return $line;
}
}
}

Yükleniyor…
İptal
Kaydet