get client info
This commit is contained in:
parent
5d34218f73
commit
483ff64847
Binary file not shown.
|
@ -17,7 +17,7 @@ class FacadeVentasClient: FacadeClient, URLSessionDelegate {
|
|||
|
||||
let HOST = "https://app.verdnatura.es/"
|
||||
//let HOST = "http://www.verdnatura.es/pruebas/"
|
||||
// let HOST = "http://172.16.198.221:8080/"
|
||||
//let HOST = "http://172.16.198.221:8080/"
|
||||
|
||||
override func WriteResponseToStream(_ facade: String, command: String, argsMessage: String!, datos: inout AnyObject?) throws{
|
||||
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.2</string>
|
||||
<string>1.3</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>18</string>
|
||||
<string>19</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string></string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
|
@ -24,6 +24,10 @@ class ClienteVentas: ModelBase {
|
|||
var Tipo: String? = ""
|
||||
var Credito: NSNumber?
|
||||
var Riesgo: NSNumber?
|
||||
var razonSocial:String? = ""
|
||||
var poblacion:String? = ""
|
||||
var codPostal:String? = ""
|
||||
var province_id:String? = ""
|
||||
|
||||
func toJson() -> Dictionary<String, AnyObject>
|
||||
{
|
||||
|
@ -39,6 +43,10 @@ class ClienteVentas: ModelBase {
|
|||
json["Tipo"] = Tipo! as AnyObject?
|
||||
json["Credito"] = Credito!
|
||||
json["Riesgo"] = Riesgo!
|
||||
json["razonSocial"] = razonSocial! as AnyObject
|
||||
json["poblacion"] = poblacion! as AnyObject
|
||||
json["codPostal"] = codPostal! as AnyObject
|
||||
json["province_id"] = province_id! as AnyObject
|
||||
|
||||
return json
|
||||
}
|
||||
|
|
|
@ -94,8 +94,21 @@ class ViewMain: MyViewVentas, UICollectionViewDelegate, UICollectionViewDataSour
|
|||
print("Error fetching remote instange ID: \(error)")
|
||||
} else if let result = result {
|
||||
|
||||
let client = self.aplication.cliente
|
||||
var direc = ""
|
||||
if (client?.Consignatarios?.count)! > 0 {
|
||||
direc = (client?.Consignatarios![0] as! Consignatario).Domicilio!
|
||||
}
|
||||
|
||||
|
||||
|
||||
let data = [
|
||||
"name": self.aplication.cliente?.Cliente! ?? "--",
|
||||
"razonSocial" : self.aplication.cliente?.razonSocial! ?? "--",
|
||||
"poblacion" : self.aplication.cliente?.poblacion! ?? "--",
|
||||
"codPostal" : self.aplication.cliente?.codPostal! ?? "--",
|
||||
"province" : self.aplication.cliente?.province_id! ?? "--",
|
||||
"domicilio":direc,
|
||||
"token": "\(result.token)"
|
||||
] as [String : Any]
|
||||
self.db.collection("users").document("\(self.aplication.cliente?.Id_Cliente! as! Int)").setData(data){
|
||||
|
|
Loading…
Reference in New Issue