Przeglądaj źródła

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

master
sp 3 lat temu
rodzic
commit
5d6a450011
3 zmienionych plików z 6 dodań i 4 usunięć
  1. +1
    -0
      .idea/vcs.xml
  2. +3
    -1
      Storage.php
  3. +2
    -3
      XeroOauth2Timesheet.php

+ 1
- 0
.idea/vcs.xml Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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;
}
}
}

Ładowanie…
Anuluj
Zapisz