parent
dc2ca953dd
commit
a96d326f09
@ -20,6 +20,8 @@ class BillHistories extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['bill_number'] = (string) $row['bill_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['document_id'] = (int) Document::bill()->number($row['bill_number'])->pluck('id')->first();
|
$row['document_id'] = (int) Document::bill()->number($row['bill_number'])->pluck('id')->first();
|
||||||
|
@ -22,6 +22,8 @@ class BillItemTaxes extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['bill_number'] = (string) $row['bill_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['document_id'] = (int) Document::bill()->number($row['bill_number'])->pluck('id')->first();
|
$row['document_id'] = (int) Document::bill()->number($row['bill_number'])->pluck('id')->first();
|
||||||
|
@ -20,6 +20,8 @@ class BillItems extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['bill_number'] = (string) $row['bill_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['document_id'] = (int) Document::bill()->number($row['bill_number'])->pluck('id')->first();
|
$row['document_id'] = (int) Document::bill()->number($row['bill_number'])->pluck('id')->first();
|
||||||
|
@ -20,6 +20,8 @@ class BillTotals extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['bill_number'] = (string) $row['bill_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['document_id'] = (int) Document::bill()->number($row['bill_number'])->pluck('id')->first();
|
$row['document_id'] = (int) Document::bill()->number($row['bill_number'])->pluck('id')->first();
|
||||||
|
@ -19,6 +19,8 @@ class BillTransactions extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['bill_number'] = (string) $row['bill_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['type'] = 'expense';
|
$row['type'] = 'expense';
|
||||||
|
@ -20,6 +20,8 @@ class Bills extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['bill_number'] = (string) $row['bill_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$country = array_search($row['contact_country'], trans('countries'));
|
$country = array_search($row['contact_country'], trans('countries'));
|
||||||
|
@ -20,6 +20,8 @@ class InvoiceHistories extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['invoice_number'] = (string) $row['invoice_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
||||||
|
@ -22,6 +22,8 @@ class InvoiceItemTaxes extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['invoice_number'] = (string) $row['invoice_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
||||||
|
@ -20,6 +20,8 @@ class InvoiceItems extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['invoice_number'] = (string) $row['invoice_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
||||||
|
@ -20,6 +20,8 @@ class InvoiceTotals extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['invoice_number'] = (string) $row['invoice_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
$row['document_id'] = (int) Document::invoice()->number($row['invoice_number'])->pluck('id')->first();
|
||||||
|
@ -19,6 +19,8 @@ class InvoiceTransactions extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['invoice_number'] = (string) $row['invoice_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$row['type'] = 'income';
|
$row['type'] = 'income';
|
||||||
|
@ -20,6 +20,8 @@ class Invoices extends Import
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$row['invoice_number'] = (string) $row['invoice_number'];
|
||||||
|
|
||||||
$row = parent::map($row);
|
$row = parent::map($row);
|
||||||
|
|
||||||
$country = array_search($row['contact_country'], trans('countries'));
|
$country = array_search($row['contact_country'], trans('countries'));
|
||||||
|
@ -327,6 +327,7 @@ trait Import
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'company_id' => company_id(),
|
'company_id' => company_id(),
|
||||||
|
'type' => $row['item_type'],
|
||||||
'name' => $row['item_name'],
|
'name' => $row['item_name'],
|
||||||
'sale_price' => !empty($row['sale_price']) ? $row['sale_price'] : (!empty($row['price']) ? $row['price'] : 0),
|
'sale_price' => !empty($row['sale_price']) ? $row['sale_price'] : (!empty($row['price']) ? $row['price'] : 0),
|
||||||
'purchase_price' => !empty($row['purchase_price']) ? $row['purchase_price'] : (!empty($row['price']) ? $row['price'] : 0),
|
'purchase_price' => !empty($row['purchase_price']) ? $row['purchase_price'] : (!empty($row['price']) ? $row['price'] : 0),
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user