| 9. Notes payable, related parties (Details - Future maturities) | Jun. 30, 2019  USD ($) | 
|---|---|
| Debt Disclosure [Abstract] | |
| Future maturity 2020 | $ 0 | 
| Future maturity 2021 | 4,752,632 | 
| Future maturity 2022 | 0 | 
| Future maturity 2023 | 0 | 
| Future maturity 2024 | 0 | 
| Future maturity thereafter | 0 | 
| Total | $ 4,752,632 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Including the current and noncurrent portions, carrying value as of the balance sheet date of a written promise to pay a note, initially due after one year or beyond the operating cycle if longer, which can be exchanged for a specified amount of one or more securities (typically common stock), at the option of the issuer or the holder. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 |