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