Merge branch 'release/2021-10-22' into test
This commit is contained in:
@@ -51,7 +51,7 @@ export function JobsCloseExportButton({
|
|||||||
{
|
{
|
||||||
jobIds: [jobId],
|
jobIds: [jobId],
|
||||||
},
|
},
|
||||||
{ withCredentials: true }
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
//Default is QBD
|
//Default is QBD
|
||||||
|
|||||||
@@ -23,14 +23,10 @@ export function JobsDetailHeaderActionexportCustomerData({
|
|||||||
logImEXEvent("job_export_cust_data");
|
logImEXEvent("job_export_cust_data");
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(
|
PartnerResponse = await axios.post(`/qbo/receivables`, {
|
||||||
`/qbo/receivables`,
|
jobIds: [job.id],
|
||||||
{
|
custDataOnly: true,
|
||||||
jobIds: [job.id],
|
});
|
||||||
custDataOnly: true,
|
|
||||||
},
|
|
||||||
{ withCredentials: true }
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
//Default is QBD
|
//Default is QBD
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
|||||||
import { UPDATE_JOBS } from "../../graphql/jobs.queries";
|
import { UPDATE_JOBS } from "../../graphql/jobs.queries";
|
||||||
import {
|
import {
|
||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser
|
selectCurrentUser,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -31,20 +31,15 @@ export function JobsExportAllButton({
|
|||||||
const [updateJob] = useMutation(UPDATE_JOBS);
|
const [updateJob] = useMutation(UPDATE_JOBS);
|
||||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||||
|
|
||||||
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const handleQbxml = async () => {
|
const handleQbxml = async () => {
|
||||||
logImEXEvent("jobs_export_all");
|
logImEXEvent("jobs_export_all");
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(
|
PartnerResponse = await axios.post(`/qbo/receivables`, {
|
||||||
`/qbo/receivables`,
|
jobIds: jobIds,
|
||||||
{
|
});
|
||||||
jobIds: jobIds,
|
|
||||||
},
|
|
||||||
{ withCredentials: true }
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
let QbXmlResponse;
|
let QbXmlResponse;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||||
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
@@ -34,7 +33,6 @@ export function PayableExportAll({
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||||
|
|
||||||
|
|
||||||
const handleQbxml = async () => {
|
const handleQbxml = async () => {
|
||||||
logImEXEvent("accounting_payables_export_all");
|
logImEXEvent("accounting_payables_export_all");
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
@@ -42,13 +40,9 @@ export function PayableExportAll({
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
if (!!loadingCallback) loadingCallback(true);
|
if (!!loadingCallback) loadingCallback(true);
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(
|
PartnerResponse = await axios.post(`/qbo/receivables`, {
|
||||||
`/qbo/receivables`,
|
bills: billids,
|
||||||
{
|
});
|
||||||
bills: billids,
|
|
||||||
},
|
|
||||||
{ withCredentials: true }
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
let QbXmlResponse;
|
let QbXmlResponse;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import {
|
|||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||||
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
@@ -33,7 +32,6 @@ export function PayableExportButton({
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||||
|
|
||||||
|
|
||||||
const handleQbxml = async () => {
|
const handleQbxml = async () => {
|
||||||
logImEXEvent("accounting_export_payable");
|
logImEXEvent("accounting_export_payable");
|
||||||
|
|
||||||
@@ -43,13 +41,9 @@ export function PayableExportButton({
|
|||||||
//Check if it's a QBO Setup.
|
//Check if it's a QBO Setup.
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(
|
PartnerResponse = await axios.post(`/qbo/payables`, {
|
||||||
`/qbo/payables`,
|
bills: [billId],
|
||||||
{
|
});
|
||||||
bills: [billId],
|
|
||||||
},
|
|
||||||
{ withCredentials: true }
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
//Default is QBD
|
//Default is QBD
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { auth, logImEXEvent } from "../../firebase/firebase.utils";
|
|||||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||||
import { UPDATE_PAYMENTS } from "../../graphql/payments.queries";
|
import { UPDATE_PAYMENTS } from "../../graphql/payments.queries";
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
@@ -33,20 +32,15 @@ export function PaymentExportButton({
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||||
|
|
||||||
|
|
||||||
const handleQbxml = async () => {
|
const handleQbxml = async () => {
|
||||||
logImEXEvent("accounting_payment_export");
|
logImEXEvent("accounting_payment_export");
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
//Check if it's a QBO Setup.
|
//Check if it's a QBO Setup.
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(
|
PartnerResponse = await axios.post(`/qbo/payments`, {
|
||||||
`/qbo/payments`,
|
payments: [paymentId],
|
||||||
{
|
});
|
||||||
payments: [paymentId],
|
|
||||||
},
|
|
||||||
{ withCredentials: true }
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
//Default is QBD
|
//Default is QBD
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||||
import { UPDATE_PAYMENTS } from "../../graphql/payments.queries";
|
import { UPDATE_PAYMENTS } from "../../graphql/payments.queries";
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
@@ -32,19 +31,14 @@ export function PaymentsExportAllButton({
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||||
|
|
||||||
|
|
||||||
const handleQbxml = async () => {
|
const handleQbxml = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
if (!!loadingCallback) loadingCallback(true);
|
if (!!loadingCallback) loadingCallback(true);
|
||||||
let PartnerResponse;
|
let PartnerResponse;
|
||||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||||
PartnerResponse = await axios.post(
|
PartnerResponse = await axios.post(`/qbo/payments`, {
|
||||||
`/qbo/payments`,
|
payments: paymentIds,
|
||||||
{
|
});
|
||||||
payments: paymentIds,
|
|
||||||
},
|
|
||||||
{ withCredentials: true }
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
let QbXmlResponse;
|
let QbXmlResponse;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user